Facebook Graph Api user_groups related error - facebook-graph-api

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

Related

How to fetch a list of Facebook groups that a user administers after new API changes?

Our app has been approved for Groups API as well as publish_to_groups API.
Earlier, Facebook let you get groups that a given user administered. However, administer field is deprecated in the latest API.
How can we fetch it now?
I finally found how to do it. Earlier, Facebook allowed you to pass a filter with ?administrator=1 GET parameter. However, they still have an undocumented field administrator that you can fetch via ?field=administrator GET parameter. It will let you know if you are an admin or not and you can use it from there.

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: How to get all links from page in API v2.7?

In Facebook Graph API v2.3 it was possible to get all links belong to specified page using "links" edge:
GET v2.3 {page_id}/links
This request shows really all links (not only published, which are accessible by /feed request). Graph API Explorer still can execute this request.
But all new Facebook applications can use only Graph API v2.7, not older. FQL also was deprecated at 08.08.2016.
So, how can I get all links from page (not only published) by Graph API v2.7 from my application? Even dirty hacks are appreciated, thank you.
Upd.: Links posts are promotable posts. They did not showed by /feed, only by /promotable_posts, which is necessary endpoint for my needs. I've found also a necessary parameter for this endpoint which shows really all links posts: include_inline.
So, final request is:
GET v2.7 {page_id}/promotable_posts?include_inline=true
GET /v2.4/{id}/links and GET /v2.4/{id}/statuses will no longer be available beginning in v2.4. As an alternative, we suggest using GET /v2.4/{id}/feed.
Source: https://developers.facebook.com/docs/apps/changelog
So you will have to use the feed endpoint and filter out links on your own.

How do I access my saved links in Facebook via the 2.5 API?

I have had a crack at this on the Graph API Explorer, but it returns nothing, not even an error. I used the API endpoint save.saves as described here.
You referenced a link to the Open Graph stories section in the docs, that´s something completely different. Afaik there is no way to get access to the saved links with the Graph API, at least not at the moment. If they ever make it available, you will find the endpoint here: https://developers.facebook.com/docs/graph-api/reference/v2.5/user

How do I get the list of facebook apps a user is an admin of using the Facebook Graph API?

Am using the Facebook Ads API to run ads. For running Mobile App Ads, I need to retrieve the apps which the logged in User is an admin of. I couldn't figure out from the documentation as to how to get this list of apps. Some stack overflow threads (How to get if a user is admin of a page (isAdmin) using the Facebook Graph API?) suggest requesting /me/accounts , but the just returns a list of facebook pages the user is an admin of. Could someone suggest some documentation in this direction?
The Graph API call /me/applications/developer returns all applications of which the user is an admin.
Read more here: https://developers.facebook.com/docs/graph-api/reference/v2.0/user/applications/developer
Doesn’t seem to be possible with the current API v2.0 – but it is with FQL, using the app_role table:
SELECT application_id FROM app_role
WHERE developer_id = me() AND role = 'administrators'
Test it in Graph API Explorer
(And yes, FQL is deprecated, but it will still be around for at least two years. And before they completely shut it off, they will implement query-like features in a future API version according to what I’ve heard from FB employees.)