facebook-php-sdk

Can I use the cookie c_user set by facebook?

本小妞迷上赌 提交于 2019-12-24 23:23:56
问题 Can I use cookie named c_user which contains the userid of facebook users who logged in? If it can be accessed by facebook php api, please provide me link. $session = $facebook->getSession(); Few suggested to use this above code to get session, but this function is not defined in facebook-php-sdk . Please show me a way to get user id of user currently logged in. Thanks 回答1: Please show me a way to get user id of user currently logged in. From http://developers.facebook.com/docs/reference

Facebook Login : Error validating verification code

青春壹個敷衍的年華 提交于 2019-12-24 21:51:02
问题 As of today an application that i have keeps getting the following error while using Facebook Login Api. Error validating verification code. Please make sure your redirect_uri is identical to the one you used in the OAuth dialog request Last successfull attempt was yesterday night 2018-08-29 23:40:00 and since then all loging attempts end up to redirect_url mismatch. My call back url is like https://mysubdomain.mysite.gr/index.php?r=site/callbackfb also tried alternative https://mysubdomain

Facebook, Check user authorization to app without prompt

岁酱吖の 提交于 2019-12-24 21:50:03
问题 I want to have a "remember me" access to my web app with facebook authorization, and check if the user has authorized my app without asking the user for permissions. I want to ask a new user from facebook for authorization only if the user starts the registration process not just to check for authorization in a first access. How can I do it? 回答1: This option is not available through the OAuth URL. I was using Facebook SDK for PHP and the solution is to use it in conjunction with the Facebook

Unsupported get request using Ads Facebook SDK for PHP

☆樱花仙子☆ 提交于 2019-12-24 16:54:21
问题 I'm trying to access ads campaigns related data (such as country, cpm, spent ...) using Facebook php-ads-sdk The Facebook user is already added as admin in Facebook Bussiness Manager. The first thing I do is get the access token given the app_secret and app_id of the user: public function getAccessToken() { try { $response = $this->client->get( $this->accessTokenUrl, [ 'query' => [ 'client_id' => $this->appId, 'client_secret' => $this->appSecret, 'grant_type' => 'client_credentials', ],

Facebook SDK breaking Codeigniter? Blank page

梦想与她 提交于 2019-12-24 15:33:39
问题 I have tested my login script on my localhost with no problems. I have now uploaded it online as can be seen at this link Obviously if you click, you can see that a blank page is displayed and I have no idea why. I did a test of a little bit of content, and removed the Facebook SDK code. //Facebook config (required for library) $fb_config = array( 'appId' => 'REMOVED', 'secret' => 'REMOVED' ); //Load Facebook library $this->load->library('facebook', $fb_config); //SET FACEBOOK USER $fbuser =

Invalid API key Exception Facebook Php Sdk FQL

。_饼干妹妹 提交于 2019-12-24 14:03:35
问题 This code: $fql2 = "SELECT uid, name FROM user WHERE uid IN (SELECT uid2 FROM friend WHERE uid1 = xxxxxxxxx)"; $params = array( 'method' => 'fql.query', 'access_token' => $user->accessToken, 'query' => $fql2, 'callback' => '' ); $result = $facebook->api($params); var_dump($result); Gives me error: Uncaught Exception: 101: Invalid API key My appId and secret are correct. I have checked it by executing $facebook->api('/me') which works perfectly alright. My access token is alright too with all

Facebook API: How to post to my own wall page?

主宰稳场 提交于 2019-12-24 11:37:23
问题 Okay, there maybe many question same to me. But I can not solve how to handle in my case. Let start: I develop a property listing website. The flowchart is simple. User can posting as many as they want using facebook login. Now they all are okay. I also can solve about how whenever user finish their posting, it will automatically post to their personal/user wall page. But I want that every listing should be also posted on MY property listing page. Whether it will post as user who make the

How to get Page Photo with the most likes & comments?

徘徊边缘 提交于 2019-12-24 09:49:23
问题 I'm using the Facebook PHP SDK to try and get the photo with the most number of likes for a Page, to be able to use as a "hero photo". The logic being that the photo with the most likes & comments is the most interesting to look at. However, the only method I can think of is slow and cumbersome. Is there a better method than using the below? 1. Query the Graph API for the albums belonging to a Page 2. Query the Graph API for Photos in each Album 3. Add the likes & comments for each photo 4.

LogIn with FaceBook API from PHP doens't work

ⅰ亾dé卋堺 提交于 2019-12-24 07:46:16
问题 I'm trying to make a LogIn or register with Facebook from my web but doesn't work, actually some weeks back that work but since the last week it doesn't change the status from the API in the father file (for give it that name) bucause I'm using MVC with PHP I declare ths script like this <script> window.fbAsyncInit = function() { FB.init({ appId : '300012410734892', cookie : true, xfbml : true, version : 'v3.0' }); FB.AppEvents.logPageView(); }; (function(d, s, id){ var js, fjs = d

Facebook Session is NULL after authentification with PHP SDK

[亡魂溺海] 提交于 2019-12-24 03:51:42
问题 I can login with my facebook app but the session I get is alway NULL. Here is my whole PHP Code: <?php session_start(); //Session should always be active $app_id = 'mySexyAppID'; //DEV Name: PHP_SDK-Prev-FB\0.0.2b4 $app_secret = 'someS3cr3tStuff'; $required_scope = 'public_profile, publish_actions,publish_stream,manage_pages,user_groups'; //Permissions required $redirect_url = 'http://localhost/fb/facebook-sdk-v4-sample-files/index2.php'; //FB redirects to this page with a code require_once _