照片导入facebook-php-sdk无法正常工作 [英] Photos import facebook-php-sdk not working

查看:56
本文介绍了照片导入facebook-php-sdk无法正常工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

$facebook = new Facebook(array(

                'appId'  => '<key>',

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

                'cookie' => true

              ));

print_r($facebook);die;

此输出为

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

   [apiSecret:protected] => <secret code>

   [session:protected] =>

   [signedRequest:protected] =>

   [sessionLoaded:protected] =>

   [cookieSupport:protected] => 1

   [baseDomain:protected] =>

   [fileUploadSupport:protected] =>
)

仅在其始终打印会话信息之前,才在10月底发生此问题.然后,我调用链接https://api.facebook.com/method/photos.getAlbums?uid='.$session['uid'].'&access_token='.$session['access_token']并用于获取相册列表.

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.

此方法可以正常工作8个月以上,从上个月突然开始停止工作.

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

推荐答案

几个月前,我们在Facebook API上也遇到了一些麻烦.

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

Facebook已已弃用您正在使用的REST API .您尝试访问的功能很可能已更改并且不再受支持.

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.

来源: http://developers.facebook.com/blog/post/616/

切换到新的OAuth2.0 API,以恢复您的功能并在一段时间内验证您的应用程序.

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

以下是新API文档的链接: http://developers.facebook.com/docs/reference/api

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

哦,以后呢……请务必从您的帖子中删除所有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.

这篇关于照片导入facebook-php-sdk无法正常工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆