Skip to content
This repository has been archived by the owner on Nov 14, 2019. It is now read-only.

Facebook REST API is deprecated #4

Closed
ndachez opened this issue Aug 19, 2016 · 4 comments
Closed

Facebook REST API is deprecated #4

ndachez opened this issue Aug 19, 2016 · 4 comments
Assignees
Labels

Comments

@ndachez
Copy link

ndachez commented Aug 19, 2016

Since August 7, 2016 > REST API is deprecated for versions v2.1 and higher (12)

To fix this bug :

For the case self::SN_FACEBOOK:
Replace :
$api_url = "http://api.facebook.com/restserver.php?v=1.0&method=links.getStats&urls=" . urlencode($url) . "&format=json";
By :
$api_url = "http://graph.facebook.com/?id=" . urlencode($url);

AND

Replace :
if (isset($json[0]['total_count'])) { $result = intval($json[0]['total_count']); }
By :
if (isset($json['share']['share_count'])) { $result = intval($json['share']['share_count']); }

Have a nice day :)

@crazy-max
Copy link
Owner

Thanks!

@crazy-max crazy-max self-assigned this Aug 19, 2016
@crazy-max crazy-max added the bug label Aug 19, 2016
@ndachez
Copy link
Author

ndachez commented Aug 22, 2016

Hi,

After use, I noticed that Facebook limited the number of requests... I would try to find a less restrictive alternative.

Have a nice day :)

@crazy-max
Copy link
Owner

Ok thanks!
I you have any update do not forget to leave a message ;)

@crazy-max
Copy link
Owner

I have created a new issue for the limitation : #5

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants