Lorenzo
Lorenzo

Reputation: 4648

Facebook dialog feed not working from other clients

I have the following feed dialog code. Users report me that they are unable to share but from my machine even using different browsers without any history it works perfectly. What could the problem be? What's a good checklist to debug this problem?

FB.init({appId: "1111", status: true, cookie: true});

function postToFeed(description) {

  var obj = {
    method: 'feed',
    link: 'http://example.com/',
    picture: 'http://example.com/static/facebook-app-icon.png',
    name: 'Example app',
    caption: 'Example caption!',
    description: description
  };

  FB.ui(obj);
}

<div id='fb-root'></div>
<a onclick="var msg=getShareMsg(); postToFeed(msg); return false;">
    <img src='/static/facebook.png' alt="Share" title="Share on Facebook">
</a>

Upvotes: 0

Views: 350

Answers (2)

codewrangler
codewrangler

Reputation: 350

To build on the questions Joe T was asking:

  • When you're saying it works from your machine, I'm assuming you and your end clients are both looking at the same server? (http://example.com)
  • http://example.com is both listed in your app profile and example.com is in your list of domains?
  • Try logging in under another non-developer facebook account.

Upvotes: 0

Joe T
Joe T

Reputation: 794

Firstly, are they getting the popup with an error message, or nothing at all?

If it's nothing at all:

  • Is it a Javascript error on their end (Check the JS error console)
  • Are popups being blocked on their machines that you have allowed? This will happen if there is no user event triggering the popup

If it's the FB popup with an error:

  • Is the app in sandbox mode and are you the only developer? Check (https://developers.facebook.com/apps//summary)
  • Has the FB JS SDK loaded correctly? How you are including the '//connect.facebook.net/en_US/all.js' file?

Upvotes: 1

Related Questions