I am using facebook graph api with this edge
me/conversations?fields=participants
Graph API Explorer
this get list of conversation for my page using page access token. Now i need to search in this list by user name
Any suggestion to do that directly with API or any workaround ?
As a workaround you can call with the limit parameter set:
me/conversations?fields=participants&limit=500
It will show you 500 latest threads. Then cmd+f (ctrl+f) and type the name you are looking for.
Related
I want to get the JSON result of all the shared posts or statuses with the hashtag of my company name #company_name. How can I proceed with this. Currently I have tried with Facebook Graph Explorer Tool using the built-in access token, but this doesn't seem to give the data.
As user WizKid (Software Engineer at Facebook) states in the comments, there is no API for hash tags.
You can search through public posts using Post search in API v1.0 but this is not possible in v2.0.
I'd like to use Facebook's Graph API to retrieve the official posts from a given page. This means that the wall posts must be the one's made by the page's administrators and must exclude comments made on the posts. I'm aware that the base URL for the Graph API is http://graph.facebook.com/, but I'd like to use it without an access token. Is there anyway to do this?
No. You can't retrieve the posts using a given page without an Access Token.
You can retrieve posts by performing a GET request to the following end point (and of course using a valid Access Token):
https://graph.facebook.com/{page-id}/posts?access_token=YOUR_ACCESS_TOKEN
You can also choose particular field(s) by specifying them in the URL. For example:
https://graph.facebook.com/{page-id}/posts?access_token=YOUR_ACCESS_TOKEN
&fields=message,type,likes
You can try out this example in the Facebook Graph API explorer.
The new graph search on facebook page allows you to search for current employees of a company by typing a query like "Current Google employees" on the top search bar.
Now how to do the same via Graph API? Or if not possible via Graph API, then I am thinking of scrapping it using say, Scrapy, but then it redirects me to the login.php page. Any help would be appreciated.
Thanks
It's not possible via Graph API based on how permissions and privacy in the API work.
I am not rolled out to Graph Search but I'm guessing each query has a specific page and you can use Scrapy to pull it. The reason you are being redirected is because you don't have the proper headers and cookies (such as dtsg and datr) to see the page. You need Scrapy to impersonate the user of the page.
Though, it wouldn't make sense building an application like this. The whole point of the API is so that you don't scrape pages without their permission. This sounds like a sure way to ask for a cease and desist once you usage is noticable.
I'm trying to use Facebook's Graph API to grab a user's insights data, and display it in an admin panel for them, as a part of their custom CMS.
There are a few steps to my Facebook integration:
1. Authenticate
2. Get a list of pages, applications, and domains for the user
3. Get insights data for each page, application and domain
All of the above are working, but I can't find a way to list all the domains a user has. I'm using https://graph.facebook.com/me/accounts to get the list of accounts for the user. This is returning all the Pages and Applications, but no Domains.
I have looked all over Facebook's docs, and can't find any reference to a method for retrieving a list.
I have tried https://graph.facebook.com/domains, https://graph.facebook.com/me/domains, https://graph.facebook.com/domain, and https://graph.facebook.com/me/domain - to no avail. https://graph.facebook.com/domain and https://graph.facebook.com/domains are valid, but are only useful if you know the domain.
So, the question: Is there a way to obtain a list of domains for a user using the Graph API?
Thanks
try this Graph API call: https://graph.facebook.com/fql?q=SELECT domain_name, domain_id FROM domain WHERE domain_id in ( SELECT domain_id FROM domain_admin WHERE owner_id=me())&access_token=VALIDUSERACCESSTOKENOFTHEOWNEROFTHEDOMAIN
In their recent changes, Facebook now links your likes and interests with community and fan pages. How can I retrieve this information using the old rest API and Facebooker. I tried things like this to get the music preferences :
facebook_session.user.music
but I get a blank string instead of the relevant connections. Is it mandatory to use the new Graph API in order to make this work?
I believe this data can only be accessed via the Graph API.