facebook-php-sdk

Facebook CurlException 3 No URL set

为君一笑 提交于 2019-12-25 07:37:28
问题 I am getting FacebookApiException Object ( [result:protected] => Array ( [error_code] => 3 [error] => Array ( [message] => No URL set! [type] => CurlException ) ) [message:protected] => No URL set! [string:private] => [code:protected] => 3 [file:protected] => /home5/theteci0/public_html/team/fb6/base_facebook.php [line:protected] => 979 [trace:private] => Array ( [0] => Array ( [file] => /home5/theteci0/public_html/team/fb6/base_facebook.php [line] => 911 [function] => makeRequest [class] =>

Facebook getAccessToken() returns app access token: works fine in one server but throws app access token in other.

你。 提交于 2019-12-25 07:30:20
问题 Facebook getAccessToken() returns app access token: works fine in one server but throws app access token in other. I have tried all the answers given in previous such questions. But doesn't seem to work. <code> $acces_token = $this->facebook->getAccessToken(); print_r($acces_token); output: app ID | app secret </code> The funny part here is the same code works in localhost and one of my servers. I recently got another server, and this thing doesn't work in this server. 回答1: I had the same

Facebook PHP SDK: api('/me') strange behavior [closed]

孤街浪徒 提交于 2019-12-25 06:47:04
问题 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 7 years ago . Since i really don't understand the $user = $facebook->getUser(); function (it returns NULL even if the user is logged in...) I'm trying with this code.

facebook api blank response and no exception

梦想与她 提交于 2019-12-25 06:43:34
问题 $facebook = new Facebook(array( 'appId' =>Yii::app()->params['FBappId'], 'secret' =>Yii::app()->params['secret'] , )); // Get User ID $user = $facebook->getUser(); if ($user) { try { // Proceed knowing you have a logged in user who's authenticated. echo $accessToken=$facebook->getAccessToken(); echo '<br/>'; $user_profile = $facebook->api('/me'); print_r($user_profile); echo "normal sdk"; exit; } catch (FacebookApiException $e) { echo $e; exit; $user = null; } } echo "normal sdk end";exit; i

Upload video to facebook with php-sdk graph api

蹲街弑〆低调 提交于 2019-12-25 05:36:05
问题 I have seen an example in facebook documentation. $post_url = "https://graph-video.facebook.com/me/videos?" . "title=" . $video_title. "&description=" . $video_desc . "&". $access_token; But i want to do this in facebook php-sdk. $facebook->api('/me/videos/'); But it seems the video server is https://graph-video.facebook.com. So how do i do this in graph api using php-sdk? 回答1: through graph its much more simple To a group you can do this: <?php $app_id = "YOUR_APP_ID"; $app_secret = "YOUR

Facebook PHP SDK & Codeigniter: Unable to load config

房东的猫 提交于 2019-12-25 04:55:11
问题 my config/facebook.php $config['appId'] = 'XXXXX'; $config['secret'] = 'XXXX'; $config['fb_access_token'] = 'XXXXXX'; my controller: $this->load->library('Facebook'); echo $this->config->item('fb_access_token'); Outputs nothing for the the token? yet I know the library is loading as I can call getAppID ok. It just doesn't seem to be loading this config file. Also tried this from the controller: $this->config->load("facebook",TRUE); $config = $this->config->item('facebook'); $this->load-

Creating a facebook event and publishing a cover photo

感情迁移 提交于 2019-12-25 04:52:10
问题 I'm creating a facebook event through the php sdk using $param = array( 'name' => $name, 'start_time' => $ate, 'description' => $description, 'picture' => $photo ); $facebook->api('/me/events', 'POST', $param); Is it possible to set a cover photo for the event that is being created at this call? If not, can I set it somehow? The documentation says that the cover field needs a photo id. If I haven't uploaded the photo yet, it doesn't have an id, so what do I do? Do I upload the photo to the

How to use Facebook SDK 4.0 without composer with autoloader

守給你的承諾、 提交于 2019-12-25 03:35:53
问题 I want to send a notification to a Facebook user. I have the following setup example, but can't seem to get anywhere, Keeps giving an error that "Facebook Class not found". <?php session_start(); require_once 'autoload.php'; require_once( 'src/Facebook/FacebookSession.php' ); require_once( 'src/Facebook/FacebookRequest.php' ); use Facebook\FacebookSession; use Facebook\FacebookRequest; $facebook = new Facebook(); $app_id = '654346742464654654'; $app_secret = '--my-secret--'; $app_access_token

Retrieve User ID of Facebook App Invitor

五迷三道 提交于 2019-12-25 02:24:22
问题 In the context of a given Facebook app, suppose User A invited user B to start using it. Once User B accepts to use the app, is there any way to retrieve the ID of User A programmatically (via either PHP/JS SDK) ? This doesn't seem quite documented. For what it's worth, A/B users are friends, if it's any use. 回答1: when user comes following the app request, you can get request id's using $_GET['request_ids'] then retrieve all the request ids with which you can call graph api to get the

get data from text area and post to a wall onfacebook

跟風遠走 提交于 2019-12-25 02:06:41
问题 not sure if this is possible, but what i need to do is take the data from my text area and let the user post that to their wall. my code snippet <div align="center"> <form method="GET" action="translate.php"> <textarea name="status2" cols="50" rows="5"<input type="text"/> <?php echo str_ireplace(array ('old','awkward','all','again','behind','along','alright','hello','among','children','yes','child','kids','food','barnard castle','beer','book','blow','beautiful','bird','burst','brown','burn',