How can I add users to a Facebook group automatically? -
the flow i'm going is:
- user signs in facebook our site.
- user pays fee using paypal or similar service.
- user allowed access particular facebook group.
i'm not particularly fussy how process works, i'd avoid manual step if possible.
i know can't invite them using graph api (as they're not admin, developer or tester of app). there other way round? button allows them request access confirm using api? automatic way of emailing invite?
or there way of making easier manual step? way of listing new users "invite group" button? friend request button user press?
with facebook api can't normal group, can use app groups instead. create app group, have post request url:
http://graph.facebook.com/{your-app-id}/groups
with following informations:
- valid app access token
- name: name of group
- description: description of group
- privacy: enum, can open or closed
- admin: admin's user id
then recive gropu id. can info group ith request url:
http://graph.facebook.com/{group-id}
edited: can no longer add members post request, there way.
new solution
you can use client-side dialog add members groups. can find documentation here: https://developers.facebook.com/docs/games/app-game-groups/v2.0#add_user
i tested user wasn't tester, andd works fine.
old solution (no longer available)
you can add members group post request url:
http://graph.facebook.com/{group-id}/members
you have post:
- valid app access token
- member: user id of person invite
the person recive image: your app's name has invited group's name http://edemmester.hu/sof_notify.png
i tested it, works fine.
more info app groups: https://developers.facebook.com/docs/graph-api/reference/v2.0/app/groups
important! have use app access tokens here, not user access tokens.
Comments
Post a Comment