facebook-php-sdk

OAuthException : An active access token must be used to query information about the current user

半城伤御伤魂 提交于 2019-12-19 17:48:40
问题 I'm trying to run the sample code for Facebook connect that I downloaded from http://thinkdiff.net/facebook/php-sdk-3-0-graph-api-base-facebook-connect-tutorial/ I get this error message : [error] => Array ( [message] => An active access token must be used to query information about the current user. [type] => OAuthException [code] => 2500 ) You can try on my website : http://facebook.oliverjordan.net/thinkdiff Here is the fbmain.php code : <?php //facebook application $fbconfig['appid' ] =

Is it possible to get the User Id without the authorization?

大兔子大兔子 提交于 2019-12-19 12:22:06
问题 Is it possible to get the user ID without authorization? It used to work with getUser but it doesn't now. Are these new changes from Facebook or is there any other possibility to get user ID or the name to welcome the user? 回答1: No, users must give permission before you can get their user id. 回答2: See http://developers.facebook.com/docs/reference/api/permissions/ Basic Information When a user allows you to access their basic information in an auth dialog, you have access to their user id,

Facebook Graph API tagged_places returns empty array

谁都会走 提交于 2019-12-19 10:47:20
问题 I'm trying to get a users tagged_places but the array always comes back empty. If I go through the Graph explorer and generate a token then I get the results as expected but using an access token generated in my application I get returned an empty array. I am requesting the user_tagged_places permission, I know that my app will have to go for review because of this permission requirement but I am just testing right now with my own developer account and test users but it doesn't work for any

facebook->getUser() returns 0

纵饮孤独 提交于 2019-12-19 09:47:01
问题 I assume that this is because users have to grant some sort of access to my facebook application, for getUser to be available to me? Here is my code: <? require 'facebook.php'; ?> <?php $facebook = new Facebook(array( 'appId' => '[//fb app id]', 'secret' => '[//fb app secret]', 'cookie' => true )); $uid = $facebook->getUser(); echo $uid; ?> So I guess my question is, short of prompting the user to give permission to my app, is there any other sort of unique identifier that I can grab from a

Facebook Graph API v2.1: getting user id and his posts

…衆ロ難τιáo~ 提交于 2019-12-19 09:02:35
问题 Imagine the situation when I'm logged in facebook web application as userA. I know userB's nickname but he is not in my friendlist and I do not know his id. And, of course, he does not use my app. How can I get userB's id via a nickname? After that how can I get his wall posts? Are there any specific permissions? May be there are manual pages I've missed? 回答1: In v1.0, the following was possible: http://graph.facebook.com/v1.0/{user-name} However, with v2.0 and v2.1, accessing users via IDs

Posts scheduled via Graph API frequently do not get published

↘锁芯ラ 提交于 2019-12-19 08:14:20
问题 Hi I'm using facebook php sdk to make posts to my fanpage. I am attempting to schedule these posts to the future. I am running into some problems though. Here is my code <?php // This code is just a snippet of the example.php script // from the PHP-SDK <https://github.com/facebook/facebook-php-sdk/blob/master/examples/example.php> require_once('facebookphp/src/facebook.php'); $app_id = "xxxxx"; $app_secret = "xxxxxx"; // Create our Application instance (replace this with your appId and secret

Posts scheduled via Graph API frequently do not get published

梦想的初衷 提交于 2019-12-19 08:14:04
问题 Hi I'm using facebook php sdk to make posts to my fanpage. I am attempting to schedule these posts to the future. I am running into some problems though. Here is my code <?php // This code is just a snippet of the example.php script // from the PHP-SDK <https://github.com/facebook/facebook-php-sdk/blob/master/examples/example.php> require_once('facebookphp/src/facebook.php'); $app_id = "xxxxx"; $app_secret = "xxxxxx"; // Create our Application instance (replace this with your appId and secret

Facebook PHP SDK: Upload Event Cover Photo

自闭症网瘾萝莉.ら 提交于 2019-12-19 03:42:10
问题 I use the facebook-php-sdk to create an event for a page. Now as described here it is possible to upload a picture to an event. The problem with that is, that this is the profile picture. But since more than a year now, facebook provides new, large cover photos for events. I want to upload a picture to there, not as a profile picture. Is that possible? I didn't find any help on the Facebook Developer Graph Api Events Page as there only the way to upload a profile picture is described (HTTP

Which Facebook SDK to use with PHP 5.3?

我是研究僧i 提交于 2019-12-19 02:47:14
问题 Unfortunately I've reached a bit of a dead end. Due to various legacy and other reasons, I can't upgrade a system to PHP 5.4. And according to Facebook, I need 5.4 to run the latest SDK. I'm willing to settle for a lower SDK, but: Will I be okay if I use an older SDK? Which SDK should I use? Bonus Question: What should the composer path be changed to to use the old SDK? Currently I have: "facebook/php-sdk-v4" : "4.0.*" 回答1: You can still use the old one: https://github.com/facebookarchive

oAuth exception #200 while trying to post to groups after recent Facebook maintenance

▼魔方 西西 提交于 2019-12-18 13:17:09
问题 "message":"OAuthException: (#200) Insufficient permission to post to target on behalf of the viewer","trace":"[]","code":0 This message started to appear randomly after the recent Facebook maintenance actions. My users are generating this error while trying to share into their groups. Any thought on how to solve this?. 回答1: When the application request the permission, you need choose Public, not Only Me. 回答2: Check Your app's privacy settings is public.Otherwise make it to public. To Change