ok…my first help. lets say i am want to access some data like my user’s likes from facebook. how do i set up facebook graph using the user access token with bubble? where do i insert the access token?
Looks like you need to use the API Connector plugin and the FB Graph API documentation. It’s not simple but it looks possible. You gave me an idea for a new tutorial.
ok. after installing the api connector and getting my access token from the graph documentation. my question is how to set all that up in api the connector
That’s not easy to explain. My own process when dealing with a new API is to get it working in Postman first (I highly recommend you download it, and it’s free). There also tends to be more documentation to be found when you Google it. Like “Facebook graph with Postman”.
Once it is working in Postman, the process is trivial to set it up in Bubble’s API connector.
hello…have you been able to get on with this? am waiting for you though
You don’t need to get the token, the API connector (via OAUTH) will do it for you …
ok…i did this, it didn’t work…And from what I read in facebook graph, this might only return my own likes…I want it to return a user who is logged into my application “likes”. for example when a user, Nigel logs into my app with facebook, let my app have access to Nigel’s likes with his permission.
I have seen other apps do that
Yes, that is what it should do.
ok then. let me try it again. but my graph is v2.10…would it affect anything? or should I stick to v2.8?
ok…I got an invalid OAuth access…what could I have wrong?
This is super useful, thank you @NigelG!
Still it’s not working unfortunately.
Mainly I’m trying to get the user’s gender, since I’m building a female only app.
But since the gender is in the “public_profile” I thought why not call for the whole thing, since I’ll use the name etc. anyway.
I tried this (for gender only to start off with):
But I keep getting this:
Help, please?
Is that on the OAUTH part or the call to the graph API ?
It’s when setting up the call. Still in the plugin. Can’t make it work.
By now I’d be happy if I’d at least got the gender!
So the only difference between your call in mine is that I am using v2.8 I think. But that doesn’t seem to make any difference.
How is your FB App set up ?
If (when) we get there … gender is as follows.
Scope = public_profile
https://graph.facebook.com/v2.8/me?fields=gender
I got the same error as you when I changed to 2.12. I went back and re-signed up again with a button on my page, then I got the message about OAUTH being initialised. Then I went back and tested my calls.
Not suer which one exactly you mean?
But if I want the whole public_profile, I’d have to put "https://graph.facebook.com/v2.8/me?fields=gender,name,id, … " ?
Because I had it that way first and then the support told me it’s: “graph.facebook.com/v2.12/me/[gender]”
When do you get the message ? When you click the button on the page that does the “Signup with social network” ?
Why not "whowho.bubbleapps.io ? That would be the live version, wouldn’t it?
When I click on “Initialize Call”
And it works when you logon ok ?
You need to have initialised OAUTH for the subsequent calls to work
I haven’t gone to that stage, since setting up the call isn’t working in the first place. Or at least I get nothing but error messages.
Also, you say :
https://graph.facebook.com/v2.8/me?fields=gender
Support says:
graph.facebook.com/v2.12/me/[gender]
Unfortunately, nothing for me works.
What do I have to put into “value”? and what does this error message mean anyway?
OK, but you have to do the login first, otherwise the call doesn’t work. It is saying that you don’t have a valid token. And you don’t because the token only comes from Facebook when you do the login part.
Those are for passing parameters into the GET. Whereas Gender is returned.
So the process is …
- Have a button on your page that does a login using the OAUTH FB API that you have set up.
- Sign up
- Then go back and do the Initialise calls.
If you jump straight to 3 it won’t work.