Post something in Facebook public group using android studio

1k Views Asked by At

I have integrated Facebook sdk with android studio and i can post something on my profile. I want to post something on a public Facebook group. How can i do that?

1

There are 1 best solutions below

2
Gustavo Morales On

To post on Facebook you app need permissions to do that.

Write Permissions - Apps need separate publish permission to post content on the person's behalf.

To request permission to publish you need add the following permission publish_actions. To ask for publish permissions in your app, you can use the LoginManager.

LoginManager.getInstance().logInWithPublishPermissions(
    fragmentOrActivity,
    Arrays.asList("publish_actions"));

Here is the documentation to make a sharing in Facebook.

But if your app requests this permission Facebook will have to review how your app uses it.

Update:

About posting on open groups, documentation says the following:

You can't publish on this endpoint, however Facebook apps and games can create new app groups using a different edge.

You cant