I would like to get a facebook group id by using a URL or specific identifier.
For ex: http://www.facebook.com/groups/chennaifoodies/ should give group id 194462073956868.
Is there way to get the group id by using above URL or identifiers like 'chennaifoodies'?
If I tried https://graph.facebook.com/chennaifoodies, then it gives the fan page id.
I think 'wallflux' has done a wonderful script, so I need a script like that to get group the id.
is there any way to get a group id using graph api or fql?
Thanks.
I don't think you can get the Group ID from the url you mentioned with the group username.
But, you surely can get the same with the url:
http://graph.facebook.com/search?q=chennaifoodies&type=group&access_token=ACCESS_TOKEN
Yes, you'll be needing an active user access token to query this.
Or, the graph API (the same thing)-
/search?q=chennaifoodies
Demo
Related
I am looking to search Facebook public profiles using the Graph API with parameters like name, location and age. To accomplish this I created a Facebook app to get an app ID but I am unsure as to how to proceed to make the query to the API.
To try it out I tried using the explorer (https://developers.facebook.com/tools/explorer/) but I am unable to get any results that does not contain "me". I made sure to get a access token and enter a query like the following:
search?q=tobias&type=user&fields=id,name
The only reply is:
{
"data": [
]
}
I feel like I am missing something but I have been unable to figure out what, please advice.
The search endpoint is broken since 2018-04-04 for certain search types, including pages and users.
Search API
You can no longer use the /search endpoint with the following object types:
event
group
page
user
See
https://developers.facebook.com/docs/graph-api/changelog/breaking-changes#search-4-4
Due to what has recently been in the news, searching for users has been deprecated, and is not supported through Facebook APIs.
when using github users api to return users data through
https://api.github.com/users?page=6&per_page=2
return the same data every one although change page parameter value and per_page
why this and how to fix to change different data
i try to edit header request and add this header
Name Link
Value <https://api.github.com/users?page=1&per_page=2>; rel="next",<https://api.github.com/users?page=50&per_page=2>; rel="last"
But Still not working
After my search
now Github use API V3 and if you want return users with paging you can use this
https://api.github.com/users?since=1&per_page=100
Instead of using "page" and "per_page", that endpoint uses "since" and "per_page".
The since parameter says from which user ID the API should start listing users. For example:
https://api.github.com/users?since=1&per_page=100
will start listing users from the user with ID 1, and
https://api.github.com/users?since=10001&per_page=100
will start listing users from the user with ID 10001.
While I do realize that the ids for graph api objects are not documented, I'm seeing some oddities which I'd like to understand.
I have an authorized app that polls a page's feed for new comments and it looks like I'm getting different ids for the same post.
On first run I get a post with the id of:
1470990656482896_1553567768225184
Which is the id of the page and post joined by an underscore.
The second poll which ran a few minutes later, I received the same post with a different id:
100008124617959_1553567768225184
Which is the user id of the poster and post joined by an underscore.
While I'd like to understand the inconsistency, the real problem is trying to access the post via the second identifier returns an Unsupported get request with the code of 100
The post is public and is accessible via both
https://www.facebook.com/100008124617959/posts/1553567768225184
and
https://www.facebook.com/1470990656482896/posts/1553567768225184
This sounds like an oauth problem. While the post is public, to access it via the graph API you have to use an access token.
If you use the access token for Hans Gotwo then you should be able to access the post with the id of 100008124617959_1553567768225184
Looks like it's a bug. thanks #phwd
https://developers.facebook.com/bugs/721538487964698/
How i can get users details in FB by their id?
I have ids array, and i need to get all user's profiles by one query from ActionScript, is it possible?
This example is taken from the very first page of the Graph API Documentation under the 'selection' heading:
You can also request multiple objects in a single query using the
"ids" query parameter. For example, the URL
https://graph.facebook.com?ids=arjun,vernal returns both profiles in
the same response.
This works with the ?fields selector too, so you could also do https://www.graph.facebook.com/?fields=id,name,picture&ids=<CSV LIST OF IDS>
I would like to know how do events hosted by a group connect to that group so I can retrieve all events from a specific group (all I have the group id).
This needs to be done using FQL and PHP SDK (I know my way with these, but I am unable to find anything about connections between groups and events).
Meanwhile, GROUP_ID/events works pretty well for me here.
It was possible with REST API if you look at this:
http://developers.facebook.com/docs/reference/rest/events.get/
They say:
"The uid can be replaced by gid in order to get events hosted by a group instead of by an individual user."
I tried to get events of groups I have joined via the Graph API Explorer and it worked as well as a little restFB (Java) implementation I made.
So, could it be a permission issue at your site?
Doesn't look like you can pull that off.
The documentation of the Group object does not mention a collection of events, and if you try to get /GROUPID/events from the graph api you get an error saying "Unsupported get request".
The fql documentation of the group table also has nothing on events, and the event table is only indexed by the event id which means that there's no way to connect between events and groups.
Up until a couple of weeks ago the following would do exactly what you need
SELECT name FROM event WHERE eid IN
(SELECT eid FROM event_member WHERE uid = <uid from group>)
but the api changed to using group objects so the code does not work anymore. Sadly, I have not found another way to get the events from a specific group.
Facebook has broken this one before. : (
Will see if I can trace down how we got it fixed last time.
In the mean time, the closest I could get is:
https://graph.facebook.com/fql?q=SELECT eid, name, host FROM event WHERE eid IN (SELECT eid FROM event_member WHERE uid = $uid AND start_time > 0) AND host = '$group_name'&access_token=$token
Variables:
$uid = uid of a group admin
$group_name = name of the group
$token = access token for the above group admin with user_events permission
Only downsides I can see are:
An auth token is required (even for a public group); and
The admin used must be invited to all events (this is usually the case anyway). If the admin isn't invited, it appears that the event won't show up.
Update: Facebook bug report - please add your support so we can get this fixed:
http://developers.facebook.com/bugs/197158423732088
Try the updated Wallflux-events: http://wallflux.com/events/115227675156013