facebook-graph-api

Post to facebook page wall as a page

為{幸葍}努か 提交于 2020-01-22 12:42:01
问题 I want to post to facebook page wall as a page using PHP. I've got access_token by below links. https://graph.facebook.com/oauth/authorize?type=user_agent&client_id=123456789&redirect_uri=http%3A%2F%2Fmysite.net&scope=publish_stream,manage_pages,offline_access https://graph.facebook.com/me/accounts?access_token=... I'm using this simple code: $appid = ""; $secret = ""; $pageid = ""; $access_token = ""; require_once("facebook-php-sdk/src/facebook.php"); $facebook = new Facebook(array( 'appId'

Creating Facebook event for specific page with FB Graph API

泪湿孤枕 提交于 2020-01-22 05:32:50
问题 I need synchronize events from my CMS to Facebook specific page. I'm trying to create an event for my created page but still have no result. I can simply create events, related to user, but not to page. Code uses Facebook PHP-SDK. $page_id = '31337'; $page = $facebook->api("/{$page_id}"); $event_data = array( 'name' => 'Event: ' . date("H:m:s"), 'start_time' => time() + 60*60, 'end_time' => time() + 60*60*2, 'owner' => $page ); $post = $facebook->api("/{$page_id}/events", 'POST', $event_data)

Picture post to Facebook ends up in the wrong place

女生的网名这么多〃 提交于 2020-01-22 04:32:46
问题 I am trying to post a picture to Facebook page with id= 226338660793052, but it keeps ending up in /me/photos. What am I doing wrong? NSMutableDictionary *params = [NSMutableDictionary dictionaryWithObjectsAndKeys: imageToSend, @"source", facebookMessageTextView.text, @"message", nil]; [facebook requestWithGraphPath:@"/226338660793052/photos" andParams:params andHttpMethod:@"POST" andDelegate:self]; I get no error message. I get nothing, except that the photo ends up in my own album, me

Facebook API: Problem accessing multiple pages from my App via Pages API

一世执手 提交于 2020-01-21 19:37:33
问题 Premise: After solving the mystery of the permanent token access, I have been able to post on my Readerly.Ink page from my app. Problem: My app, however, is supposed to post on multiple pages, depending on the language of the content. Hence, I today created the other pages (Readerly - Italiano, Readerly - English etc) but I cannot see them through the app! Even if i GET /me/accounts, the original/first Readerly.Ink page is all I see. I also tried: /new-page-id?fields=access_token&access_token

Facebook Open graph tags for blogger - OG Image is too small. Can I designate full size image instead of thumbnail?

南楼画角 提交于 2020-01-21 11:48:13
问题 Blogger does not allow you to designate an open graph image in each post. Currently, there is a piece of code in the template that designates the automatically generated thumbnail as the open graph image for facebook. The problem is, the thumbnail image is 72*72 and Facebook now requires at least a 200px width in the OG image or it defaults to the first image on the page that meets the criteria, which is my header image. My question is this: Can I amend this code in my template to designate

Facebook Open graph tags for blogger - OG Image is too small. Can I designate full size image instead of thumbnail?

落爺英雄遲暮 提交于 2020-01-21 11:46:28
问题 Blogger does not allow you to designate an open graph image in each post. Currently, there is a piece of code in the template that designates the automatically generated thumbnail as the open graph image for facebook. The problem is, the thumbnail image is 72*72 and Facebook now requires at least a 200px width in the OG image or it defaults to the first image on the page that meets the criteria, which is my header image. My question is this: Can I amend this code in my template to designate

feed dialog: picture not showing up

旧城冷巷雨未停 提交于 2020-01-21 10:59:08
问题 My Facebook feed dialog link correctly renders a dialog page, but the image set with the picture parameter does not show up -- just the gray line that indicates no picture. I've changed picture files and types a few times, but the image still doesn't show up. Here is the code: $share_url = "https://www.facebook.com/dialog/feed?app_id=$app_id"; $share_url .= "&link=http://www.doozeez.com"; $share_url .= "&picture=http://doozeez.com/images/halloweenloot.png"; $share_url .= "&caption=to spend in

feed dialog: picture not showing up

懵懂的女人 提交于 2020-01-21 10:58:08
问题 My Facebook feed dialog link correctly renders a dialog page, but the image set with the picture parameter does not show up -- just the gray line that indicates no picture. I've changed picture files and types a few times, but the image still doesn't show up. Here is the code: $share_url = "https://www.facebook.com/dialog/feed?app_id=$app_id"; $share_url .= "&link=http://www.doozeez.com"; $share_url .= "&picture=http://doozeez.com/images/halloweenloot.png"; $share_url .= "&caption=to spend in

tag facebook friends python sdk GraphApi in put_photo

孤人 提交于 2020-01-21 10:30:40
问题 I would to post pictures and tag with frieds. graph = facebook.GraphAPI(self.cfg['access_token']) tags = [{"tag_uid": "1234567890", "x": 0, "y": 0}, {"tag_uid": "0001234567890", "x": 0, "y": 0}] graph.put_photo(image=open(str(file), 'rb'), message='Pictures test', **{'tags': tags}) but i've this error facebook.GraphAPIError: (#100) param tags must be an array. 回答1: error solved with tags = [{"tag_uid": "1234567890", "x": 0, "y": 0}] graph.put_photo(image=open(str(file), 'rb'), message=

How to parse a facebook graph api response

空扰寡人 提交于 2020-01-21 09:24:51
问题 I have a facebook graph api request which brings back this response Facebook\GraphObject Object ( [backingData:protected] => Array ( [data] => Array ( [0] => stdClass Object ( [id] => 111 [from] => stdClass Object ( [id] => 111 [name] => fo bar ) [name] => etc ) I've tried to do $reponse->{'backingData:protected'} but it doesn't work. Also the next set of results is a link to the graph api but the results from this is pure json. [paging] => stdClass Object ( [cursors] => stdClass Object (