Is there any way we can get posts, status of Facebook to show in our application based on some Keywords or GEO location. I have done it for Twitter using developer account where I used to apply some token keys and gets the result in json format.
Is there any similar way to get posts from Facebook developer account?
You can use the Search API to search based on keywords. Like this:
https://graph.facebook.com/search?q=football&access_token={ACCESS_TOKEN}
To search for objects near a geographical location, use type=location and add the center and distance parameters: /search?type=location¢er=37.76,-122.427&distance=1000
Here's more detail: http://api-portal.anypoint.mulesoft.com/facebook/api/facebook-graph-api/docs/reference/search
Related
I am trying to get friends list from Facebook using Facebook C# SDK.
FacebookClient fb = new FacebookClient();
dynamic me = fb.Get("me");
But I am getting all other data from me except friends related(id,name..) data,
its always giving null value.
Does anyone know what is the Problem?
Yes, the "problem" is stated in the docs:
Friend list now only returns friends who also use your app: The list of friends returned via the /me/friends endpoint is now limited to the list of friends that have authorized your app.
See
https://developers.facebook.com/docs/apps/changelog#v2_0_login
FB has (somewhat) recently changed their API such that when you request the logged in user's friends, you only get those friends who are also using your FB application.
Unless you register your FB app as a game, you will not be able to see all of the logged in user's friends, only those who have also logged into your app, and have not disabled the option to show up in other people's friend lists.
Be aware that you can't simply lie that you are making a game, FB has to review your app before giving you persmissions to see the full friends list.
I see that FQL is deprecated?
We now use the Graph API and with url .
What I want is to get all the latest pictures of my friends and NOT from pages or other stuff.
If I use:
me/home/?filter=app_2305272732
will I also get back pictures from pages and more.
How can I ONLY get pictures of friends.
Since you would need to use the read_stream permission to get friend postings in the stream of the authorized user, and since friend permissions are gone, there is no way to achieve this. You will not get read_stream approved: https://developers.facebook.com/docs/facebook-login/permissions/v2.2#reference-read_stream
Information about the friend permissions are in the changelog: https://developers.facebook.com/docs/apps/changelog
You can only get the latest photos and posts of the authorized user by authorizing him with the user_status permissions and using /me/statuses.
i have tried to get facebook group id (gid) by it's url using C#, with no luck.
I have looked over the facebook graph tables, tried PHP, FQL queries, and even tried P3P to get the feed itself of the group page (To get the 'cid' value) - But again - with no luck, I'm getting a token successfully using facebook SDK but I dont understand how to use it to get the group id or the group source code (which always returns the login page), can you help ?
You can fetch the username from the url- string after last /. You can find how to do that. Then simply use the Search API.
You'll be needing a valid user access token with the API call-
/search?q={group-username}&type=group
Example: https://graph.facebook.com/search?q=progressivenagars&type=group&access_token={access-token}
On my website, I display a list of media from a specific tag. When the user is authenticated I would like to visually mark the media that he has voted on.
Currently, the list I'm displaying is read from my own database. I have a synchronizing process that subscribes to the tag. When I get these values from the /tags/tag-name/media/recent end point, I am not authenticated as any user.
The way I had planned to do this is that when a user logs in to my website, I hit the /users/self/media/liked end point and store them in session (running c# / MVC4). But I'm looking at the JSON result from that endpoint and it's a complete "Medias response" type with paging and everything. Basically at 20 per page, if a user has liked some 250 media, logging in would require 24 API calls and would take too long.
How do you handle this issue?
I could save the them to database...
I could save the complete list of liking users as I synchronize my media...
Thanks!
When the user is authenticated and then if you make the recent tag API call /tags/tag-name/media/recent with the user's access_token, then the JSON response will have a "user_has_liked" element, this will be true if the user has liked the picture and false if not.
You can use this data to display if user have liked or not from a list of tag media. You dont have to get all user liked media and compare, instagram tag media API already has this information if you use the user's access_token to make tag media call.
Using tweetsharp to pull data for a specific user: I would like to get the numbers of retweet (RT or Retweet) and the numbers of mentioning (#).
Could you help me? Thanks.
The current version of TweetSharp, version 2.0, has methods that map directly to the Twitter API.
Assuming you have the oAuth tokens for a user you can use methods like
.ListRetweetsOfMyTweets(...)
.ListTweetsMentioningMe(...)
If you don't have access to a user's profile, you can still do a search for that user using the standard search query syntax.
.Search("to:JohnDoe" ... )
.Search("from:JohnDoe" ... )
Both should get you the details you're looking for.