简体   繁体   中英

Photos import facebook-php-sdk not working

$facebook = new Facebook(array(

                'appId'  => '<key>',

                'secret' => '<secret code>',

                'cookie' => true

              ));

print_r($facebook);die;

Output of this is

Facebook Object
(
   [appId:protected] => <key>

   [apiSecret:protected] => <secret code>

   [session:protected] =>

   [signedRequest:protected] =>

   [sessionLoaded:protected] =>

   [cookieSupport:protected] => 1

   [baseDomain:protected] =>

   [fileUploadSupport:protected] =>
)

This problems occur in the end of October only as before that it always prints information of session. Then I call link https://api.facebook.com/method/photos.getAlbums?uid='.$session['uid'].'&access_token='.$session['access_token'] and used to get list of albums.

This works fine for more than 8 months and suddenly from last month it stopped working.

We had some troubles on our Facebook API a couple months ago too.

Facebook has deprecated the REST API , which you are using. It is very possible the feature you're trying to access has changed and is no longer supported.

Source: http://developers.facebook.com/blog/post/616/

Switch to the new OAuth2.0 API to restore your features and future proof your application for awhile..

Here's the link to the new API documentation: http://developers.facebook.com/docs/reference/api


Oh, and in the future... Be sure to remove any API keys and secret codes from your posts. These would potentially allow someone else to use your credentials mischievously.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM