PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Friday, February 4, 2022

[FIXED] Photos import facebook-php-sdk not working

 February 04, 2022     facebook, facebook-graph-api, facebook-php-sdk, php     No comments   

Issue

$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.


Solution

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.



Answered By - phpisuber01
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home
View mobile version

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing