Posting to Facebook group with Graph API - php

Need some help understanding the Facebook documentation.
Using the Facebook Graph API, Can you log users into your site then allow them to post to a Facebook group?
Or is it only the group admin that can post to the group. If so, does anyone know if this is something that has changed recently ?
https://developers.facebook.com/docs/graph-api/reference/v2.5/group/feed

Can you log users into your site then allow them to post to a Facebook group?
A specific Facebook group yes. As long as you know the ID beforehand.
For everything else the only groups available will be those seen from user_managed_groups

Related

Facebook V2.3 to getFriends list

Is there any solution to get complete Facebook friends list without asking for APP permission?
Submitted for review many times but Facebook is not approving.
We need it in one of our applications.
As stated in Facebook API documentation, you can't
http://webcache.googleusercontent.com/docs/graph-api/reference/v2.3/user/friends

Facebook Graph API How to pull a list of all events a friend is attending

I'm trying to use the Facebook Graph API to pull a list of events friends of the user are attending, here is the API Documentation:
https://developers.facebook.com/docs/graph-api/reference/v2.3/user/events
If I put in:
me/events
it works, but if I put in 193300913/events it returns nothing.
193300913 is the id of a random friend, I've tried with several other friends with which I should have the right permissions to see all of they events they are attending, but it returns nothing for everyone.
What am I missing?
Also here are the permissions being requested:
$permissions = array(scope=>'user_events,user_friends');
That´s not possible, since friend permissions are deprecated for privacy reasons: https://developers.facebook.com/docs/apps/changelog
I would not want any App to get access to my events if i did not even authorize the App, just because a friend of mine is using it.

Facebook API Integration

I am trying to integrate FB with my website. (USING PHP)
1.) In that I am in need to list all the groups related to my loggedin in user in my website who is connected with their FB account in it(I have oauth_token too). Also i want to allow my user to post something in their FB group listed here using FB API.
2.) Next thing I want get all the frd list of the logged in user and to post messages/wall post to them.
I tried more in google I am not able to know whether it is possible or not. I have done only FB login integration and posting in wall.
Can any one please tell me whether the above 2 things are possible or not. Thats enough. If possible I can contiue surfing on that and make it. If not possible I'll stop surfing on that.

Programmatically post on Facebook group

I'm trying to develop a little app for Facebook, and I'm facing a problem with the API.
After a few searches, I started to think the graph API doesn't allow to do what I wanna do...
Basically, I want to post automatically a message on a group wall. I have a website on which people can post their message. This community also has a Facebook group, and my point is to automatically post a copy of messages from the website, on the Facebook group. Each time a new message is submitted on the website, of course.
I know that apps and pages can’t post on a group wall by themself.
So, I considered creating a Facebook account, working like a bot, to post my messages on the group. I guess I have to get a long-lived access token for this user, and renew it manually when it expire. I don't want to have to login myself manually, but it's not a big deal if I have to renew my token time to time.
Is that even possible? Is there a better trick to do that?
I'm a bit confused by the Facebook API, and I'm sorry for this question. Even more because of the changes on the fb API...a lot of answers through the web are now deprecated. What I am looking for is a start -an idea- to be able to develop my app.
Thank you for your help :)
Yes, it is really simple:
First, You'll need access_tokenn with the offline_access permission (this way it will last for 2 months)
Then, store this access_token somewhere and do:
Post to group wall:
$fbk = new Facebook(...);
$bfk->setAccessToken($yourBotAccessToken);
$postId = $fbk->api("/$fbGroupId/feed/",'post',$message);
You can even post replies to the first post:
$fbk->api('/'.$postid.'/comments/','post',$reply);

php: retrieving infos from facebook group

i'm looking for a way to code some statistics for a facebook group which displays infos like most active member, most commented post and such.
i've tried to parse the group's email-notifications, unfortunately facebook doesn't notify on each event.
so i was thinking about curling directly from the facebook group.
is there a way to do this or is it possible through the facebook api?
thanks
I think your best bet is Facebook Grap API.
Check this Graph API - Group : http://developers.facebook.com/docs/reference/api/group/
Hope this help!

Categories