Facebook Graph API - How to get the groupId from the group url - facebook

If I have the url of the group ex https://www.facebook.com/groups/angularjs.dev/ How to I get the group Id of it.
If I have a facebook page(https://www.facebook.com/raspberrypi/) I'm able to get the ID from https://graph.facebook.com/v2.8/https://www.facebook.com/raspberrypi/.
But this is not working for facebook Groups.

Related

Get Another User's Information by Facebook Graph API

Hello I am new at facebook graph API
when I used url like this
https://graph.facebook.com/v2.7/me?fields=id,website,about,first_name,last_name,gender,birthday,education,age_range,email,%20television,movies,hometown,context,devices,favorite_teams,work&access_token=EAAM...
I can get website, first name , gender etc of me
but when I try to get another user's information from this url
https://graph.facebook.com/v2.7/{user id}?fields=id,website,about,first_name,last_name,gender,birthday,education,age_range,email,%20television,movies,hometown,context,devices,favorite_teams,work&access_token=EAAM...
I can get null values expect first_name, last_name and id
How can I correct the mistake?
Note : the other user allows to show this info.
Thanks

Failure get facebook group id from url via facebook graph (just this one)

I already tried lot of topics and follow some groups ok we can get facebook group id, but just some group I cannot get group id it return blank data, I also add token id but it isn't work
$url = 'https://graph.facebook.com/search?q='.$groupname.'&type=group&access_token='.$session->getToken();
some group work fine but some group get nothing.
https://www.facebook.com/groups/Happypattaya/
This is one of group url that I cannot get id.
I really need to use graph or facebook sdk to get group id.
Thank you in advance for your help.
when you search facebook response group id and name. Or you can get group id or you can have it in http://lookup-id.com ( get open/close facebook group id )

How to get username of an user with fql?

I want to get all users with their name and facebook username in a group. The following query should do it but it doesn't return usernames.
SELECT name, username from profile where id in (SELECT uid FROM group_member WHERE gid = 'GROUP_ID')
Even though almost all users have an username, username field is null for each user in the result.
I don't think Facebook hides this information because of privacy issues because I'm able to get username with graph api using http://graph.facebook.com/uid.
That will only work with Graph API v1.0, which will be deprecated on April 30th 2015. With v2.0, it is no longer possible to get the username field.
See https://developers.facebook.com/docs/apps/changelog#v2_0_graph_api
/me/username is no longer available.
Username and name still can retrieve by using fql. But I don't think that you can simply get the name from the group by using general query like 'uid from groupmember', this is because Facebook secure the name of Facebook user. But you can get their name/username if that Facebook user has commented on your post.
This is the fql query to get the name/username of facebook user:
{
comments = "SELECT actor_id, target_id FROM stream WHERE post_id=\"" + postid + "\"",
commenters = "SELECT username, name FROM profile WHERE id IN (SELECT actor_id, target_id FROM #comments)",
}
If you the administrator of the group, of course you can simply get the post_id by using fql then use the post id to get the name/username.
Hope this can help to solve your problem.

FQL - can't get link info from user - 'Request Failed' error

This should be an easy one. All I want it the user's profile url.
I've tried the following FQL:
SELECT profile_url FROM standard_user_info WHERE uid = me()
but get the Request Failed error. I'm using the Graph API Explorer / FQL Query and have the latest Access Token.
Basically I'm looking for the FQL equivalent to this Graph API call:
https://graph.facebook.com/me?fields=link
Thanks for the help
If you read the documentation properly, you'll notice that-
standard_user_info requires the APP_ACCESS_TOKEN, instead of USER_ACCESS_TOKEN. You can get the App Access Token from the Access Token Tool, for the testing.
You can get the information about the authorized app users only.
So, you can test it like this-
SELECT profile_url FROM standard_user_info WHERE uid = USER_ID
Note: Don't use me() (since you are using the app access token now which didn't recognize me()), instead use you ID)

facebook api - list user identificators I invited to an event

I'm writting application for facebook using canvas using facebook php api.
My problem: is it possible (and if yes - how) to get from api list of users i (or user who gave me permision using AccessToken) invited to an event?
When i list event_members table using FQL i dont get inviter nor inviter_type informations...
SELECT inviter,inviter_type,rsvp_status,uid FROM event_member WHERE eid = someeventid
That query ends with those fields empty - and from what i read thats expected behaviour becouse its private date - who invited who.