facebook-php-sdk

Is it expected that the token received through redirect-based authentication are long lived ones

こ雲淡風輕ζ 提交于 2019-12-24 02:14:04
问题 I have an authentication implemented via redirect to facebook auth page $fb->getLoginUrl() and when this flow ends I'm getting a user access token . According to the https://developers.facebook.com/docs/facebook-login/access-tokens/#extending it should be a short living one, while mine has the expiration in 2 months after today. Is it an expected behaviour? If yes - in what cases would you exchange the token? If no - what am I missing? UPD I've just created a new application and again - the

Why does this facebook create album code create duplicate albums?

萝らか妹 提交于 2019-12-23 10:06:58
问题 I have this code that works fine (in that it creates the album properly). However, it creates two identical albums. I've tried removing message and privacy (not that this should have changed anything, but still). Nothing I try is changing the fact that this code creates two albums. I've even gone so far as to comment it out to ensure that it was the only code firing and no albums were created. I have code after this to post two test pictures and it only posts the pictures to one of the groups

Pictures of Slick carousel do now show only after coming back from a successful Facebook Connect

爷,独闯天下 提交于 2019-12-23 04:34:16
问题 I am using Slick carousel for this testimonials box: I have this button to log in using Facebook: Immediately after a successful Facebook Connect login, the Slick carousel still works but all pictures are broken: If I click around for example by clicking the logo of the home page to reload the page, everything is fixed and the pictures appear again correctly. What could be the cause of this bug? I noticed that after logging in with Facebook, the URL changes from https://example.net/San

facebook logout only doing logout from website not from the facebook?

萝らか妹 提交于 2019-12-23 03:34:22
问题 I am doing the facebook login and logout from a website. So if a user wants to login into the site he will click on facebook login and when he will click on logout then he will automatically logout from both facebook and from the site as well. So all for that I have made my code like this In index.html my code is like this <div id="fb-root"></div> <script type="text/javascript"> //<![CDATA[ window.fbAsyncInit = function() { FB.init({ appId : 'XXXXXXXXXXXXX', // App ID channelURL : '', //

Post on Facebook profile/page timeline using Facebook Graph API v3.1 PHP SDK

十年热恋 提交于 2019-12-23 03:32:01
问题 As you know that Facebook introduced new Graph API v3.1 on July 26, 2018 that changed many things for developers. One of the questions I have now is how to share/post on Facebook profile/page timeline using Facebook Graph API v3.1 PHP SDK? Reminder: Graph API v2.7 will be deprecated on Oct 05, 2018. Please use the API Upgrade Tool to understand how this might impact your app. For more details see the changelog For this I created a new apps with some settings as shown in the below screenshots.

Retrieve Parameter From Page Tab URL

谁说胖子不能爱 提交于 2019-12-23 02:49:04
问题 I have a facebook tab application that has an URL. I want to pass the URL some GET parameters. Normally this is how I do a signed request to get user data: if ($signed_request = parsePageSignedRequest()) { $config = array( 'appId' => $app_id, 'secret' => $app_secret, ); $facebook = new Facebook($config); $ret_obj = $facebook->api('/me', 'GET', array()); $theemail = $ret_obj['email']; $thename = $ret_obj['name']; $theusername = $ret_obj['username']; } I was wondering how to get the GET

Facebook login not redirecting [closed]

你说的曾经没有我的故事 提交于 2019-12-22 19:24:48
问题 This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center. Closed 6 years ago . Why is the following not working? // Login or logout url will be needed depending on current user state. if ($user) { $logoutUrl = $facebook-

&makeprofile=1 parameter no longer works

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-22 16:34:20
问题 I made several apps that invited the user to create pictures, uploaded them to facebook and then sent them to a link on facebook that allowed them to set them as their profile picture: https://www.facebook.com/photo.php?fbid=10152753169290428&makeprofile=1 In the last few days, facebook is just ignoring the makeprofile parameter. I just love developing for facebook, it's such a roller coaster ride. Can anyone help? Is there an alternative? 回答1: You can redirect to the mobile URL like: http:/

Facebook Graph audience insights queries

被刻印的时光 ゝ 提交于 2019-12-22 12:14:13
问题 I found some intriguing Facebook Graph API documentation here: https://developers.facebook.com/docs/graph-api/reference/audience-insights-query https://developers.facebook.com/docs/graph-api/reference/audience-insights-lifestyle/ https://developers.facebook.com/docs/graph-api/reference/audience-insights-lifestyles/ (plural) https://developers.facebook.com/docs/marketing-api/audience-insights-api/v2.8 I think the results of those queries will be really powerful and could help my business. But

Facebook PHP SDK 4.0 - Cannot re-ask read permissions once denied

只愿长相守 提交于 2019-12-22 10:38:05
问题 I'm currently asking users for two read permissions i.e. email and user_location and one write permssion i.e. publish_actions . Following is the code snippet I'm using to verify if the user has granted all requested permissions: $facebook = new Facebook(APP_ID, APP_SECRET, REDIRECT_URI); if ( $facebook->IsAuthenticated() ) { // Verify if all of the scopes have been granted if ( !$facebook->verifyScopes( unserialize(SCOPES) ) ) { header( "Location: " . $facebook->getLoginURL( $facebook->denied