The 'q' modifier in the Facebook Graph API - facebook-graph-api

If you go to the Graph API Explorer and append "/posts" to a user ID, then in the box on the side, one of the "modifiers" you can select is "q". Is this for searches? I didn't see it in the documentation and using it returns an OAuth error.

You can see all possible parameters in the API reference: https://developers.facebook.com/docs/graph-api/reference/v2.6/user/feed
The "q" parameter is for the Search API: https://developers.facebook.com/docs/graph-api/using-graph-api#search

Related

How to get a valid access token to query search result from Facebook graph API

I want to collect all the Facebook link from Facebook search function. What I'm using here is the Facebook graph API tool.
If I want to query the data for a keyword, for example: "limited";
I will use the URL:
https://graph.facebook.com/v11.0/search?q=limited&access_token={my_access_token}
My image
However, I got the result as in the image. When I tried to create a workplace app and tried to get the access token of that app, I got the message as in the second image.
Error message when getting the access token of a workplace app
What I need now is an access token that has the permission to retrieve the data from the Facebook search. After that, I can use python to handle the rest.
Please help me out, thank you very much!

WSO2: How to use the response of one api as a input parameter to another separate API

Can some one please let me know or guide me to achieve this:
I am calling one login API which returns authorization ticket. I need to capture the ticket information from the response message of first API and use it to invoke another API.
First and Second API are separate ones. First API is for login and second API is for creation of entity.
I have read through many posts and blogs but not able to proceed further and I am fairly new in WSO2. Can some one please guide me.
Thanks
You can simply achieve this by using a proxy service, mediation sequences and mediators. You will need 2 sequences which perform,
Log in, read the response and extract the token which then set to a property mediator. So that the second sequence can retrieve it.
Read the token which was set from the sequence1 and invoke the next API.
Then you can create a single proxy service in ESB, which invokes sequence 1 and 2.
Please go through the documentation[1] on Message Mediation for more detailed information on how to use different mediators.
[1] https://docs.wso2.com/display/ESB490/Mediating+Messages

How could I invoke an api without access token in APIM 2.0

I couldn't find a way to set "Auth Type" when I tried to create api in api-publisher.
Then I have to add Authentication to request header, but for some reason I don't want to set the auth header for my request.
And I found something in APIM Documention that said I should set "Auth Type" to "None", but I could not see this selection in api-creating page (APIM 2.0).
Will be appreciated if there are any help..thanks!!
In manage tab, resources are listed like this.
Here, Application & Application User is the default auth type. Click on it and select none.

Facebook Graph API search returns empty data for some Keywords

I'm making facebook graph api call for search user. Query is https://graph.facebook.com/search?q=vijay&type=user&access_token=MY_ACCESS_TOKEN.
I got empty response like {"data": []}.
But I'm make same API call with full name of user https://graph.facebook.com/search?q=vijaykrishnan&type=user&access_token=MY_ACCESS_TOKEN. Hear I got correct response.
I tried it via my application and Graph API Explorer. I got same result. Is there any issue in facebook side?

Business Facebook page id?

I'm tring to find the Facebook ID for my business page to use with Open Graph. I have claimed my url so I can't see the id
when I enter:
graph.facebook.com/StagecoachWineTours
I get the response:
false
Is there another way?
Your ID appears to be: 97122673369
I got it by visiting the following link:
http://developers.facebook.com/tools/explorer/?method=GET&path=StagecoachWineTours
If it is still showing up as 'false' when you reach it you'll need to click on Get Access Token. After that a dialog will appear, click on Get Access Token once more. Once you have done this click on submit.
The reason you could not retrieve your info appears to be because you need to provide an access token on your Graph API call to fetch it. Once you do that you'll be able to get all sorts of info!