Skip to content

Instantly share code, notes, and snippets.

Created January 10, 2018 16:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/57e2967c228bcd6db2dcbb00f18a1468 to your computer and use it in GitHub Desktop.
Save anonymous/57e2967c228bcd6db2dcbb00f18a1468 to your computer and use it in GitHub Desktop.
Facebook Php Sdk Get Login Status
********************
Facebook Php Sdk Get Login Status >>>
********************
http://shurll.com/c0rxw
(Copy & Paste link)
********************
–tftd Aug 29 '15 at 12:03 tftd I got a code that works to login the account using curl but I'm having a hard time figuring out how to post. Reply Hirdesh says: September 18, 2014 at 1:43 am Really awesome content, it helped me allot, thanks! Reply Nirksa says: October 11, 2014 at 11:16 pm Hi, I copied your code from demo, and created fb applicaiton and security token and app id were taken, But i m getting this error Parse error: syntax error, unexpected TSTRING, expecting TCONSTANTENCAPSEDSTRING or ( in C:wampwwwfacebookindex.php on line 23 Reply Ben Marshall says: February 4, 2015 at 8:06 am Sounds like youve got some malformed code. // Response example. $res = $fb->delete('/123', $data, '{access-token}'); If you dont want to have to send in '{access-token}' with every method call in v5, you can use the setDefaultAccessToken() method. Sign up All the examples are related to Facebook PHP SDK v5 series from facebook-php-sdk facebook-graph-api facebook-api 57 commits 1 branch 0 releases 2 contributors MIT PHP 100.0% PHP Clone or download Clone with HTTPS Use Git or checkout with SVN using the web URL. if ($accessToken instanceof FacebookAuthenticationAccessToken) { // Logged in. Not the answer you're looking for? Browse other questions tagged php facebook curl or ask your own question. // GET request. I am currently working at Page tab. Facebook PHP SDK v4: Making Requests to the Graph API try { $me = (new FacebookRequest( $session, 'GET', '/me' ))->execute()->getGraphObject(GraphUser::className()); // Output user name. I want to know how can i run it over PHP 5.2 ? September 8, 2017 at 7:16 AM Yeh Said. Would you be helpful and just spot me in the right direction on how can I use a date picker to use for $params (timerange since and until) I mean I have everything else completed the only thing I cant figure out is how to store this using ajax with the code I have. Reply boshigt says: November 26, 2014 at 8:45 pm This is GREAT post man ^^. It helped me quickly rewrite my old API using code. Saved my day. Once created, youll be provided with an App ID and App Secret. int For more information and a full list of possible fields returned, see Publish to Users Timeline A user access token with publishactions permission can be used to publish new posts. August 2, 2017 at 4:41 PM Shaun Said. In v5 a FacebookSDKException will be thrown if something goes wrong. Many thanks for posting it! I was wondering what is the purpose of the code on line 76? At this point in your code it seems that you have already verified a session. This is how to return the fields below. */]); $data = [ 'source' => $fb->videoToUpload('/path/to/video.mp4'), 'title' => 'My video', 'description' => 'My amazing video!', ]; $response = $fb->post('/me/videos', $data, '{access-token}'); For more information, see Additional Resources For more information on the Graph API, see This has a full list of root nodes of the Graph API, with links to the reference docs for each. $res = $fb->get('/me', '{access-token}'); // POST request. Reply Rahulg FDEV says: August 3, 2014 at 8:23 am can you tell me how to configure in yii framework Reply Matt says: August 4, 2014 at 10:40 am This tutorial has really helped me a lot as I get started with the Facebook SDK for PHP. LICENSE.md Update LICENSE.md Sep 6, 2015 README.md Update README.md Sep 27, 2015 add-page-tab.php graph api v2.11 update Dec 1, 2017 canvas-app-login-get-basic-info.php graph api v2.11 update Dec 1, 2017 check-declined-granted-permission.php graph api v2.11 update Dec 1, 2017 comment-on-public-posts.php graph api v2.11 update Dec 1, 2017 debug-access-token.php graph api v2.11 update Dec 1, 2017 get-all-photos-of-user.php graph api v2.11 update Dec 1, 2017 get-all-posts-on-user-timeline.php graph api v2.11 update Dec 1, 2017 get-basic-page-info.php graph api v2.11 update Dec 1, 2017 get-likes-data-posts-photos.php graph api v2.11 update Dec 1, 2017 get-list-of-friends-names.php graph api v2.11 update Dec 1, 2017 get-list-of-liked-pages.php graph api v2.11 update Dec 1, 2017 get-list-of-managed-groups.php graph api v2.11 update Dec 1, 2017 get-more-user-info.php graph api v2.11 update Dec 1, 2017 get-user-profile-picture.php graph api v2.11 update Dec 1, 2017 like-public-posts.php graph api v2.11 update Dec 1, 2017 live-video-api.php graph api v2.11 update Dec 1, 2017 login-on-website-get-basic-info.php graph api v2.11 update Dec 1, 2017 multi-photo-story.php graph api v2.11 update Dec 1, 2017 post-as-page.php graph api v2.11 update Dec 1, 2017 post-on-user-timeline.php graph api v2.11 update Dec 1, 2017 post-reactions-info.php graph api v2.11 update Dec 1, 2017 search.php graph api v2.11 update Dec 1, 2017 send-html-form-data.php graph api v2.11 update Dec 1, 2017 send-notification-user.php graph api v2.11 update Dec 1, 2017 single-multiple-posting-managed-groups.php graph api v2.11 update Dec 1, 2017 tag-friends-in-photo.php graph api v2.11 update Dec 1, 2017 tag-friends.php graph api v2.11 update Dec 1, 2017 upload-photo-on-timeline.php graph api v2.11 update Dec 1, 2017 validating-access-token.php graph api v2.11 update Dec 1, 2017 README.md Facebook PHP SDK v5 Examples For video tutorials click this link for the playlist related to Facebook PHP SDK v5 by Sohaib Ilyas (Roomi). However is there any way to get cleaner url after login. The important part is it needs to included before any output is sent. Thanks codexworld. Reply Anna says: June 12, 2017 at 5:07 am Nice tutorial.how can i also get a facebook user history??please any help Reply Leave a Reply Cancel reply Your email address will not be published. In this situation I generally return a 400 Bad Request HTTP response 5a02188284
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment