facebook-php-sdk

Error when including redirect_uri with getLoginUrl (Facebook PHP SDK)

丶灬走出姿态 提交于 2020-01-05 15:06:33
问题 I want the user to be redirected to a particular webpage after logging in using Facebook. I created a LoginUrl using Facebook PHP SDK and the user clicks on this link to log in. I followed http://developers.facebook.com/docs/reference/php/facebook-getLoginUrl/ when using the $facebook->getLoginUrl() Problem : If I were to include the redirect_uri parameter, Facebook gives me an error An error occurred. Please try again later. The login url works fine without including the redirect_uri .

how to delete video

ぐ巨炮叔叔 提交于 2020-01-05 12:23:08
问题 i can upload video to my facebook page via graph api. and i cant delete this video. i trying this but not work (php sdk) $facebook->api("/VIDEO_ID", "DELETE", array('access_token' => 'ACCESS_TOKEN')); this request responsing bellow error GraphMethodException: Unsupported delete request. but i can deleting this way any feed post i have manage_pages permission. im sorry for my bad english 回答1: It's not supported to delete videos via the API 来源: https://stackoverflow.com/questions/8507599/how-to

Now how do I authenticate in Facebook's PHP SDK 3.0.0?

做~自己de王妃 提交于 2020-01-05 07:38:10
问题 So Facebook has changed the authentication process. Again. The example in the PHP SDK is: $user = $facebook->getUser(); if ($user) { try { $user_profile = $facebook->api('/me'); } catch (FacebookApiException $e) { error_log($e); $user = null; } } However, now how do we authenticate users who have not already authenticated? Do we simply create an else statement and a call to the result of $facebook->getLoginUrl() ? Also, the example above gives me an error as the call to $facebook->getUser()

Post to a Facebook user's wall from a page or app

牧云@^-^@ 提交于 2020-01-04 14:01:26
问题 I can get a user to authorize my app and later on I can post on their wall with this code: new Facebook(...); $facebook->api('/'.$uid.'/feed', 'post', array('message' => 'My app says hi')); This works but the post that appears on the user's wall is by the user (it has their face and name next to the post with "via My App" next to it). Is there a way to have the post appear to be by the app (or my page) with my profile photo and name next to it? I have tried many variations of the above

OAuthException when trying to upload/post photos to group

三世轮回 提交于 2020-01-03 22:58:46
问题 I am currently trying to upload photos to pages and groups through an app. I have these codes: try { $facebook->setFileUploadSupport(true); $args = array('message' => 'This is my image caption',); $args['image'] = '@'.realpath('./uploads/terragarden1.png'); $response = $facebook->api('/GROUP_ID/photos/','POST',$args); } catch(FacebookApiException $e) { echo "Error: ".$e; } The value of $args['image'] would be something like this: @/home/publica/public_html/AutoPost/uploads/terragarden1.png

OAuthException when trying to upload/post photos to group

烈酒焚心 提交于 2020-01-03 22:58:23
问题 I am currently trying to upload photos to pages and groups through an app. I have these codes: try { $facebook->setFileUploadSupport(true); $args = array('message' => 'This is my image caption',); $args['image'] = '@'.realpath('./uploads/terragarden1.png'); $response = $facebook->api('/GROUP_ID/photos/','POST',$args); } catch(FacebookApiException $e) { echo "Error: ".$e; } The value of $args['image'] would be something like this: @/home/publica/public_html/AutoPost/uploads/terragarden1.png

Facebook Session Transfer js-SDK to php-SDK

北慕城南 提交于 2020-01-03 04:59:19
问题 I am using PHP SDK 2.1.2 and using the standard http://connect.facebook.net/en_US/all.js as the JS SDK. This is what i want to achieve: 1) Initialize JS Sdk, Call Fb.UI with (email,user_location,user_birthday), method: 'oauth', in response, if the user successfully gives permission do an ajax call to the server and then use PHP-SDK to do a call to Graph API and get the required data. (Well, you might argue to do a call to graph API via JS SDK but the current scenario requires me to use PHP

Facebook PHP SDK - Post to user's wall as app and not user. How?

℡╲_俬逩灬. 提交于 2020-01-03 04:53:07
问题 I have a few questions about Facebook PHP SDK I haven't found the answers to yet, hope someone here can help. I have made a page where users connect to Facebook to be able to share things via my site on their wall. I don't want to use the offline_permission. But I need to be able to delay post, cause sometimes we need to confirm choices they use. I read that YOU CAN post at any time with stream_publish, but you need to post as THE APP and not THE USER. Right now I think I post as the user.

Facebook Requests ID(s) retrieve and delete

倾然丶 夕夏残阳落幕 提交于 2020-01-03 04:42:08
问题 So I'm developing a small web app, that implements the Requests Dialog(User-to-User) . I'm able to send an invite and also successfully to save data as request id and user id. But when the user gets redirected to my app, after clicking on the request, i can't retrieve request id as shown here: https://developers.facebook.com/docs/requests/#deleting and then delete it. But i see the request id in the address bar of the browser and it looks like this: http://apps.facebook.com/myownapp/?fb

Facebook Error (#200) The user hasn't authorized the application to perform this action (PHP)

∥☆過路亽.° 提交于 2020-01-03 03:21:11
问题 I am posting on facebook profile, pages and groups using my webapp.since morning it showing error "Exception occured, code: 200 with message: (#200) The user hasn't authorized the application to perform this action". I added all permissions required for posting. $loginUrl = $helper->getLoginUrl( ["public_profile", "user_groups","publish_actions","email","user_location","user_photos", "user_likes","manage_pages","user_birthday","user_status","read_stream"] ); $requestPage = new FacebookRequest