osompress / genesis-simple-share

Plugin: Genesis Simple Share
36 stars 16 forks source link

A note: graph.facebook.com's api doesn't seem to work when using Safari or on Chrome and Firefox's private browsing modes #83

Closed sashimii closed 7 years ago

sashimii commented 7 years ago

Posting this here since I was investigating this issue and I want to ensure that other folks also trying to figure out why the GSS Facebook Button doesn't show a number on private browsing and Safari understand what's happening. The issue seems to be with facebook's Open Graph API.


Here's how the request looks on the aforementioned browsers where we have this problem, using the following link:

https://graph.facebook.com/?id=http%3A%2F%2Fwww.toronto.com%2Ffood-drink%2Ftorontos-best%2Fbest-fried-chicken%2F&callback=jQuery112409174139990936965_1473864943581&_=1473864943582

Result:

/**/ jQuery112409174139990936965_1473864943581({
   "error": {
      "message": "(#4) Application request limit reached",
      "type": "OAuthException",
      "is_transient": true,
      "code": 4,
      "fbtrace_id": "HFELzsXkv6+"
   }
});

Here's how the same request looks on Chrome and Firefox (not private browsing):

/**/ jQuery112409174139990936965_1473864943581({
   "og_object": {
      "id": "863504060416887",
      "description": "Toronto restaurants are cooking up some seriously good fried chicken, with perfectly crispy skin, delicious sides and unique spice blends.",
      "title": "Best Fried Chicken in Toronto - Toronto.com",
      "type": "article",
      "updated_time": "2016-09-12T13:32:03+0000"
   },
   "share": {
      "comment_count": 0,
      "share_count": 52
   },
   "id": "http://www.toronto.com/food-drink/torontos-best/best-fried-chicken/"
});

I don't purport to know the answers of what's causing it. Could be something wrong with headers for all I know.

Maybe a solution could be to also make requests with facebook's PHP SDK so that there's a number served from Wordpress that can be used in case of a user being in private browsing mode