facebook-php-sdk

Photos import facebook-php-sdk not working

让人想犯罪 __ 提交于 2019-12-11 15:01:50
问题 $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

How to overcome the newly arised #200 error while posting to my Facebook page programatically?

て烟熏妆下的殇ゞ 提交于 2019-12-11 14:42:29
问题 I've been using the PHP SDK to post to a Facebook page of mine for two years. Today I was greeted with this error: (#200) Requires either publish_to_groups permission and app being installed in the group, or manage_pages and publish_pages as an admin with sufficient administrative permission I haven't changed anything, and as far as I remember, those permissions were not required when I need to post only to the page I own. I use PHP SDK v.5.5.0. Here's my code: $fb = new Facebook\Facebook([

Facebook Authentication throws Errors for a few Users

泪湿孤枕 提交于 2019-12-11 12:49:06
问题 I am working with a team to build a Facebook game. For one of the people on the team, it will throw errors and not get his id or data. It works for everyone else that has tested, ~20 people. The error that is thrown: Warning: file_get_contents(https://graph.facebook.com/oauth/access_token? client_id=165114483572553&redirect_uri=http%3A%2F%2Fapps.facebook.com%2F (*INSERT APP*)%2F&client_secret=(*SECRET_CODE*)&code=AQBnvIjs0jaUnoUKkjsh3K7G7JK QYMrIx525Jn6jYmDtWS74nEa_TTZf6e4p7jPadyjaS9t-M

Having an issue with catch (FacebookApiException $e) in login with facebook using php sdk

浪尽此生 提交于 2019-12-11 12:22:19
问题 My facebook login code using php sdk isn't working. When I click on the login button in index.php, it opens a pop up where i enter my email and password and then it just brings me back to index.php with some code appended to the url like this: http://localhost/test.php?code=AQAr4gedKEz01BGIGpIB5Ijh66bk9j7qhW9...etc Also $user was returning 0 even after trying to login. I did some digging in base_facebook.php and found this. There is a function that gets an Access Token using the code from the

After changing website domain, facebook login returns error “This authorization code has been used”

帅比萌擦擦* 提交于 2019-12-11 12:21:34
问题 Note: Before I start, I checked all the other questions on this site which pertain to the same exception and none of the answers worked for me. I've been having trouble with the facebook sdk and facebook login for a few days now. My website had to change domain (from benotes.com to notepit.com). Since I've changed this, I can no longer use facebook login and get the error "This authorization code has been used". I changed everything in my facebook app to the new domain, and even tried

Does Facebook's login API update the timezone offset depending on whether DST is used in a user's area?

我与影子孤独终老i 提交于 2019-12-11 11:54:03
问题 When I output the facebook's user data [my facebook acc's] $user = $this->facebook->api('/me'); print_r($user); it gives -7, which is correct, but does it account for when DST is in effect? like when DST is in effect AND if my location uses DST, does FB update/change the offset accordingly? [timezone] => -7 [locale] => en_US 回答1: Facebook's documentation explains that the timezone field is the user's timezone offset from UTC. What it doesn't make clear, but I have found through

Facebook PHP SDK - User still shows as logged in on web app even though logged out of Facebook

青春壹個敷衍的年華 提交于 2019-12-11 11:28:28
问题 I'm working on a website for myself in order to provide coaching to people who are interested in joining fitness challenge groups. To do this, I've decided to use Facebook as my platform for group correspondence. Subsequently, I've begun working on incorporating Facebook login into my website (www.fitnesschallenges.net) and am mapping Facebook users who join a group to the corresponding group's database within my site. The platform I'm using for my site is Wordpress and I've had to be

Secure browsing is not supported in my app

ぐ巨炮叔叔 提交于 2019-12-11 10:32:33
问题 I have an old application that I'd like to get running again. I've updated the Facebook PHP-sdk to the latest version (I think) and everything is working for most users. Except those using secure browsing. My app simply tell me that: This application does not yet support secure browsing (HTTPS). How do I fix this? I've looked though all the settings in the app-page and I can't figure it out. 回答1: You need to purchase and setup an SSL certificate and then plug your https url into your app's

post on Facebook through cron job

我怕爱的太早我们不能终老 提交于 2019-12-11 10:07:43
问题 I try to build an facebook auto poster for the own users wall (post as user to own wall). Therefor I have to do an facebook application through https://developers/facebook.com/apps . After I’ve defined the Secure Canvas URL I wrote the code for the index.php of the Secure Canvas URL to have the ability to post messages, links or pictures to the own users wall: session_start(); require __DIR__ . '/autoload.php'; use Facebook\FacebookSession; use Facebook\FacebookRequest; use Facebook\GraphUser

Facebook Open Graph Watch action

梦想的初衷 提交于 2019-12-11 09:52:16
问题 I'm trying to make a Facebook video application so users can have a video stored on my site displayed on their wall using Facebook Open Graph. I'm using the below code for user login. <script> window.fbAsyncInit = function() { FB.init({ appId : 'MYAPPID', // App ID status : true, // check login status cookie : true, // enable cookies to allow the server to access the session xfbml : true // parse XFBML }); }; // Load the SDK asynchronously (function(d){ var js, id = 'facebook-jssdk'; if (d