facebook-graph-api

How to specify location targeting of FB post via Graph API

时光总嘲笑我的痴心妄想 提交于 2020-01-02 08:55:18
问题 Some time ago there was a field called targeting in the Post API Reference but now it's gone and I don't know how to add a specific location and language targeting to the post via API. I've search a lot: some results refer to the targeting parameter. I've tried it, but it seems don't working. I've tried 2 ways to achieve this, but without any success: $post_details = array('message' => $msg, 'privary' => array('value' => 'CUSTOM', 'description' => array('country' => 'Germany'))); $fb->api('

Search “ALL” public events using Facebook graph search API

落花浮王杯 提交于 2020-01-02 08:37:16
问题 Although this question has been asked before but that was an year before and not exactly what I wanted to ask. So, here it goes: I am using https://graph.facebook.com/search?q=conference&type=event to find all the events having a keyword "conference". Question 1: I just get one page of results and the pagination link at the bottom of the page yield to a page with no data (just some structure). However, searching from my facebook I can see many many more events. How can I search for "ALL" (or

Friend with the highest number of mutual friends

こ雲淡風輕ζ 提交于 2020-01-02 07:53:13
问题 I want to find my friend whom I share with them the highest number of mutual friends. I tried to do it with FQL and graph API the following way: Get the friends list of the current logged in user. FQL: SELECT uid1 FROM friend WHERE uid2="MY_USER_ID" and uid1 IN (SELECT uid1 FROM friend WHERE uid2=me()) Graph API: $facebook->api('/me/friends?format=json&limit=5000') For each one of the uid's in the list, I can get the list of mutual friends and count it. FQL: SELECT uid1 FROM friend WHERE uid2

Retrieve the picture associated with a Facebook Graph API PlaceTag node without /picture edge?

喜夏-厌秋 提交于 2020-01-02 07:48:25
问题 I'm working with the latest version of Facebook's Graph API (v2.3). I'm using the tagged_places edge on my user object to show a list of places where I've been tagged. According to the docs, this will include location tags on photos, videos, posts, statuses and links on my profile. For each tagged place, I receive a PlaceTag node. According to the docs I can use the picture edge to retrieve the picture which was tagged in this location - presumably this only works when the post in question is

Is there a way to get the ID of a message thread in Facebook? [closed]

时间秒杀一切 提交于 2020-01-02 07:40:30
问题 Closed . This question needs details or clarity. It is not currently accepting answers. Want to improve this question? Add details and clarify the problem by editing this post. Closed 6 years ago . If I have the URL of a facebook thread from a user's messages, is there a way to get the id of that thread? I get how to construct a url given an id, but not the other way around. The URL can have two formats: https://www.facebook.com/messages/123456789 or https://www.facebook.com/messages/

Facebook open graph private group feed request

允我心安 提交于 2020-01-02 07:09:09
问题 I want to get data from graph api, in particular I try to get timeline from a group. For example lets take a look at request provided on fb developers overview... https://graph.facebook.com/195466193802264 this returns a json with group info as expected https://graph.facebook.com/195466193802264/feed this should return group's timeline, but I get the error below { "error": { "message": "An access token is required to request this resource.", "type": "OAuthException", "code": 104 } } So I

facebook php - how to get album cover photo

跟風遠走 提交于 2020-01-02 07:08:48
问题 I need to get the album cover photo with the PHP SDK (Facebook). I try with: https://graph.facebook.com/[ALBUM_ID]/picture?type=album, but I get a default image... for example... to get profile pic of user https://graph.facebook.com/[USER_ID]/picture?type=square Somebody can tell me the correct way to get cover photo for albums please. thanks. 回答1: You could just use FQL, it is my preferred method and offers a lot of flexibility. This code sample should be what you need: $album_id =

Publish limit on Facebook's Graph API

蓝咒 提交于 2020-01-02 06:42:09
问题 I've been using the Graph API for a while. One feature of my application is that it allows a user to post a message on their friends walls (dont worry it is not spam). Anyway...there is a limit on the API and it will only allow a certain number of posts before failing. I've read on the facebook bucket allocation limits but my app's limit has not moved. It was 26 when i created the app. It is still 26 even though there are about 20 users. What can I do to increase my pulish limit? And I

About Graph API of Facebook Places

别来无恙 提交于 2020-01-02 06:16:12
问题 i can not see good documentation about Facebook Places, please tell me if you know something about it. https://graph.facebook.com/search?q=coffee&type=place&center=37.76,122.427&distance=1000 1) In above url what is the unit of distance? (Meter, KM, Miles or something else?) 2) What is the actual meaning of distance.. is it search result comes within this range or it starts search within this range and goes beyond for more results? 3) How can we restrict search result to any specific city or

About Graph API of Facebook Places

强颜欢笑 提交于 2020-01-02 06:16:04
问题 i can not see good documentation about Facebook Places, please tell me if you know something about it. https://graph.facebook.com/search?q=coffee&type=place&center=37.76,122.427&distance=1000 1) In above url what is the unit of distance? (Meter, KM, Miles or something else?) 2) What is the actual meaning of distance.. is it search result comes within this range or it starts search within this range and goes beyond for more results? 3) How can we restrict search result to any specific city or