FaceBook GraphAPI Retrieves only id,Fname,Lname,photo,id & link - facebook-graph-api

Am using graph api(v1.0) along with an old appid which was been created before the v2.0 was been released in MVC4 application and trying to get self work history using the code
FacebookAPI api = new FacebookAPI(Session["access_token"].ToString());
Jsonobject people = api.Get("/me", args); // where args are the FBgeneral fields(id,first_name,last_name,work,education,location,picture,link) here it works fine BUT
when i try to get the same using the same api(v1.0) and newer appid which was been created recently before two months the self users work details not getting retrieved. It only retrieves(id,first_name,last_name,picture,link)

If you don't specify explicitly the API version to use, the newer Facebook App will use the API v2.0.
For apps created on or after April 30th 2014, making an API call without a specifing a version number is equivalent to making a call to v2.0 of the API.
src: https://developers.facebook.com/docs/apps/changelog#v2_0
You can check the used Facebook API version by the following HTTP-Header: facebook-api-version
src: https://developers.facebook.com/docs/apps/changelog#v2_1

Related

Facebook Api for retrieving the business invoices

I'm trying to retrieve business invoices using a curl command and testing this on Facebook Graph API Explorer. This is the query that I'm using
<FB_Business_ID>/business_invoices?start_date=2019-06-01&end_date=2019-07-01
The query is taken from this document
https://developers.facebook.com/docs/marketing-api/business-manager/get-started#invoice
I'm making this call using the 14.0 version, I also tried on 13.0 and 12.0, and I have all the necessary permission to create this call. Every time on making a call, I get a single data object

Get user list of owned apps facebook graph api

How can I get the list of apps ids owned by me via the Facebook graph API?
I tried using the graph api explorer: graph api explorer with this url:
me?fields=accounts which gives me the user accounts.
My question is how to get the user owned apps ids
There is no way.
Earlier it was possible with this endpoint: me/applications/developer
The result:
User/applications endpoint is deprecated for versions v2.6 and higher
On version v2.11, I believe you are looking for: https://graph.facebook.com/v2.11/me/applications?access_token=USERACCESSTOKEN&type=developer

Facebook Graph Api user_groups related error

I wanted to use Graph Api to fetch the groups where user is member. But since 2.4, FB has deprecated the user_groups permission. In Graph Api Explorer, when I tried it with v2.3, it returns the results as expected. After seeing this, I implemented the same in my app with the version parameter of GraphRequest. Doing this, did not show me the results, instead they showed the error of permission.
What should I do then? Is there any way to use v2.3 for Graph Api? As per the sdk, my current Graph Api is 2.9
Use user_managed_groups instead, there is no other way. You can only access groups you manage and you cannot go back to an older API version. Even with an older App it would be pointless, see deprecation info in the changelog: https://developers.facebook.com/docs/apps/changelog

Corona SDK Facebook returns app_scoped_id and not my normal user_id

If I have understood it correctly Facebook made some changes so it returns app_scoped_id instead of the normal user_id.
The problem I have now is that no other function seems to work.
I receive an I id from Facebook, and it's the same each time I login, but if I use facebook.request("me/friends") the table is empty, if I use facebook.showDialog("friends") it
What do I need to do in Corona SDK to get this to work? Before I could use these functions after having setup them up in Facebook.
I read this thread explaining why this happen but it doesn't explain how to solve it in Corona SDK: Get Users App-Scoped user id in Facebook Graph API
As of Facebook API v2.0, friends list (/me/friend) returns ONLY user's friends who are already using your application. This limitation applies to all apps that are on v1.0 mode too.
If you're looking to get friends for tagging actions: https://developers.facebook.com/docs/graph-api/reference/v2.0/user/taggable_friends
If you're looking to get friends for inviting to a Facebook Game on Canvas: https://developers.facebook.com/docs/graph-api/reference/v2.0/user/invitable_friends
Cheers!

Facebook API Post Search Deprecated?

I am trying to perform a search via the Facebook API and getting the following error from Facebook - (#11) Post search has been deprecated
URL I am using to query graph:
https://graph.facebook.com/search?q=search_query&type=post&access_token={access_token}
Any ideas why this is happening as I can't seem to find anything about the post search being deprecated?
UPDATE
Graph API v1.0 has been fully deprecated and is no longer available as a workaround. Original answer below for reference.
Yes, version 2.0 of the GraphAPI does not let you search for posts anymore. See the updated documentation.
You can continue to search for posts by changing your API call to:
https://graph.facebook.com/v1.0/search?q=search_query&type=post&access_token={access_token}
I.e. add v1.0/ after https://graph.facebook.com/
As mentioned Niraj Shah, searching by the type "post" is already 'Legacy' API method and could be used with path '/v1.0/search?type=post', BUT there is one more trouble - your application can't use v1.0 API, if it was created after 30th April 2014. So be careful. According this answer.
According to Facebook, "All Facebook-enabled apps will be automatically upgraded to API v2.0 on April 30, 2015. If you have mobile apps, you'll need to update your app well before that date - leaving additional weeks for people to download your update from the store", and "Public post search is no longer available".
Check this for details: https://developers.facebook.com/docs/apps/upgrading