How do I search users using the Facebook Graph API?
I've tried:
GET https://graph.facebook.com/search?q={name}&type=user&access_token={token}&appsecret_proof={proof}
GET https://graph.facebook.com/v2.12/search?q={name}&type=user&access_token={token}&appsecret_proof={proof}
But both return empty data:
{"data":[]}
I saw a question which mentioned that some search features had been deprecated in API v2.0. Is it still possible to do a user search? I can't find any Facebook API reference for doing a user search.
Turns out the problem was because I was using a test user account. I tested with a real account and it's working.
GET graph.facebook.com/v2.12/search?q={name}&type=user
Requires access_token.
Requires appsecret_proof if "Require App Secret" is enabled.
Returns empty data with test user account.
Related
i need help with instagram integration..
so basically i want to create an instagram integration from my website.
I already prepare:
Change my instagram app to business/creator account
Connect to facebook from "edit profile"
Create a page that has similar name with IG acc
and here is the reference that i want to build, https://kol.lemon.cm/settings/connect-social-media
i tried to use the login button from developers.facebook.com, but i dont have any "onboarding steps" like the way the website has it.
And the access token that is generated from that site can successfully getting my instagram data, while from my access token, i can't get any facebook page connected with it
[First step using touch.facebook.com](https://i.stack.imgur.com/t8KZX.png)
[Second step using touch.facebook.com](https://i.stack.imgur.com/P4YJv.png)
[Third step using touch.facebook.com](https://i.stack.imgur.com/MpdPN.png)
if i use fblogin from developers.facebook.com, i dont get any onboarding page like that, which i found it very helpful for my users to complete the instagram integration
I already implement the facebook login, and already got the access token but still cant get the data from instagram integration process.. while in that site, it can give me the data from instagram integration process
Our application (kind-of got legacy) has been using IG API to authorize users (by using the uid attribute returned from IG's callback API response) and we have left email as an optional param (safe to assume that there are many users in the application database without email IDs persisted)
With new Instagram Basic Display API (advised), it's mentioned to use Facebook Login for authentication purpose. But I am facing a major problem of identifying existing users now (since the uid will be different).
Also I have a doubt on what will have happen for users having instagram account without linking their Facebook account to it?
I could not find a proper explanation or a documentation for seamless migration for my situation.
Please help with sharing the right resource or guidance to achieve the same.
I am trying to extract my posts, via Graph API from facebook. I used some basic code snippets but they don't work. I can not get my feed even in the Graph Explorer. It always says that I don;t have the permission and I have to submit my App for review and provide a video tutorial on how I use the extracted posts.
But I want to extract just my posts, I don't care for anybody elses. Do I seriously need FB App review to do that?
This is what I get with my token from my app:
user/posts requires additional contract signing:
Use /me/posts with your own App, with your User Token and authorize with the user_posts permission. This works without any approval from Facebook - for your account and your App only, of course. I just tested if it still works in the Graph API Explorer and it did: https://developers.facebook.com/tools/explorer/108138225915615/?method=GET&path=me%2Fposts&version=v5.0
I have some previous experience with the youtube and youtube analytics api where there was an option to use https://developers.google.com/oauthplayground/ to essentially create an offline situation for your own user account api access. By creating the key in the developer console you could add that to a custom oAuth credentials. The user account you were logged into would then generate the access token and refresh token needed. I do not see Google Photos API listed as an option here. I would prefer not to create a website just to get a prompt once (myself).
Any help would be greatly appreciated.
If you are specifically after a token to make your own requests to the API, you can still use the OAuth 2.0 playground. You can enter your own scope in the tool under step 1, just below the list of scopes on the left side. (The text box is labelled "Input your own scopes".)
Here you can manually enter a scope that's listed on the "Authentication and authorization scopes" page in the Google Photos Library API developer documentation.
In step 2, you can access a refresh and access tokens and construct your own request in step 3. Note that you won't be able to List possible operations for this API.
Note that you can also specify your own OAuth client ID and client secret from your own Google developers project. You can find this under the "settings" icon on the right, under "Use your own OAuth credentials". Otherwise, tokens are automatically revoked by the playground after a certain amount of time.
However - If you just want to explore the API through the playground, you can use the version that's embedded in the reference documentation. You can find it on each page for a method, for example mediaItems.list. This version includes support for all API methods and makes it easy to construct correct API requests.
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.)