facebook-php-sdk

FB wall posting OAuthException

允我心安 提交于 2019-12-08 11:25:54
问题 i have integrated the feed post PHP-SDK by using the following set of codes $attachment = array( 'access_token' => $accestoken, 'message' => "Favorite Restaurant is ".$business['name'].$business['location']['city']."-What is yours? ", 'name' => $business['name'], 'link' => $business['personal_url'], 'description' => "<b>myTaste || real restaurant reviews, share your taste on myTaste</b>", 'picture'=> "http://mysite.com/images/gui/header/mytaste.gif" ); $facebook->api("/".$usid."/feed", "post"

Upload image/video to facebook asynchronously using php sdk 4

自作多情 提交于 2019-12-08 09:01:17
问题 I am trying to upload video/image to facebook albumb using php sdk 4 asynchronously.I googled and found that php asynchronous call be sent using fsockopen . However, it is not working for facebook request. I have two files, one for checking login and getting token. Then second file is called for uploading the file to facebook. Below is the code for first file: // start session session_start(); Yii::import('application.vendor.*'); require_once('facebook-4/autoload.php'); use Facebook

Facebook PHP SDK/Graph API - Returning MY name/info, but not anyone elses?

南笙酒味 提交于 2019-12-08 07:19:25
问题 I'm trying to use the Graph API and the PHP SDK for Facebook to try and return the current users name, but I'm only having luck with it displaying my name. This is pretty straight forward and someone that knows the Graph API shouldn't have any problem helping me out just by looking at the code I'm using. require 'facebook.php'; $appid=get_post_meta($thisID,'_EFBPDAppID',true); $appsec=get_post_meta($thisID,'_EFBPDAppSec',true); $facebook = new Facebook(array( 'appId' => $appid, 'secret' =>

Facebook->api(“/me”) raises “CurlException: 3: No URL set!”

有些话、适合烂在心里 提交于 2019-12-08 07:06:45
问题 I have an iframe page tab facebook app that, for some users on some pages, raises a "CurlException: 3: No URL set!" exception when calling $facebook->api("/me"). Here is the code : $config = array(); $config['appId'] = APPID; $config['secret'] = APPSECRET; $config['cookie'] = true; $config['fileUpload'] = false; // optional $facebook = new Facebook($config); $facebook->setExtendedAccessToken(); $access_token = $facebook->getAccessToken(); if (isset($_GET['tk'])&&($_GET['tk']!="")){ $_SESSION[

Facebook iFrame application redirect

冷暖自知 提交于 2019-12-08 06:04:00
问题 I am writing an application in Facebook that is meant to be shown through a page tab on my own business page. I need to interact with the viewing user, thus I require extended rights. I've followed the suggested procedure but have now hit a wall. My application sits in an iFrame and the request for extended rights uses redirection. I can get the page where you need to confirm authorization but when you click allow, Facebook redirects to the page where my application is hosted instead of back

having trouble sending facebook notification via ajax call to php

六眼飞鱼酱① 提交于 2019-12-08 05:15:47
问题 In my javascript I have a click event that triggers an ajax call to the php page where I send my notification from. I chose to do it this way because the documentation advises against using your app secret in any client side code, and the notifications parameters requires an access token that you can only get using the app secret. The problem I'm having is that even though I'm logged in, $facebook->getUser() is returning 0 in php, so the api call I make afterwards to send the notification

Facebook PHP SDK not loading as a library in CodeIgniter

被刻印的时光 ゝ 提交于 2019-12-08 03:45:15
问题 I'm having a problem simply loading the Facebook PHP SDK (v3.1.1) as library in CodeIgniter 2.0. 1) I've put the latest Facebook SDK files ('facebook.php', 'base_facebook.php', and 'fb_ca_chain_bundle.crt' ) into my application/libraries folder. 2) I've changed the filename of 'facebook.php' to 'Facebook.php'. 3) In my controller, I have the following code: $fb_config = array( 'appId' => 'XXXXXXX', 'secret' => 'XXXXXXX' ); $this->load->library('facebook', $fb_config); $this->load->view('home

How to check if someone shared my page's post? Using Facebook API

此生再无相见时 提交于 2019-12-08 03:12:02
问题 I have the read_stream access from user, I want to award him some points if he shares one of my pages' post. Now I have Claim Point button so I can crawl his posts, and I want to check if he has shared my page's post (using Share link of Facebook, near Comment and Like ). I had an Idea, if someone shares others' post it appears as a link, so I tried to match the link with my page's link, but if its a Facebook link (or post like status, note) then url form below FQL returns null . Same happens

Authentication with Facebook (PHP SDK) and Codeigniter

旧时模样 提交于 2019-12-08 02:48:16
问题 Alright, so for a couple days now I have been trying to integrate Facebook authentication into my Codeigniter based website. I have included the Facebook PHP SDK as a library and that seems to connect just fine, however when I use the getUser method in the SDK a 0 is returned indicating that I am not logged in (except that I am logged in to facebook). Below I have included the PHP SDK in library form, the model that calls the methods in the SDK, the controller that captures data from the

Facebook PHP SDK - Getting error when posting to facebook page but post is created

孤者浪人 提交于 2019-12-08 01:54:25
问题 I don't know why but I get the following error when I'm trying to post to a facebook page that I've created: Fatal error: Uncaught exception 'Facebook\FacebookAuthorizationException' with message 'Unsupported post request. Here's the code that I currently have: <?php session_start(); require 'vendor/autoload.php'; use Facebook\FacebookSession; use Facebook\FacebookRedirectLoginHelper; use Facebook\FacebookRequest; use Facebook\FacebookResponse; use Facebook\FacebookSDKException; use Facebook