Suvonkar
Suvonkar

Reputation: 2460

Public post on FB wall using restfb

I am suing restfb and version 1.19.0

I want to post on my FB wall and make that post as public. I am using the below code.

FacebookClient facebookClient = new DefaultFacebookClient(<My Access Token>,
                Version.LATEST);
FacebookType publishMessageResponse = facebookClient.publish("me/feed", FacebookType.class,
                Parameter.with("message", "Sample Post"));

It is posting on my FB wall but it is posting as Private and only visible to my Friends. Please refer the below screenshot.

enter image description here

But I want to make this post as Public and visible to all. Is it possible using restfb api? Or do i need to change any settings in FB account?

Upvotes: 0

Views: 207

Answers (1)

Suvonkar
Suvonkar

Reputation: 2460

I have got the solution. Basically at the creation of Access Token facebook will prompt you to provide option as public to post in your wall. By default this option is Friends, so I have changed it to Public and it works.

Please refer the below screenshot, where you have to select Public.

enter image description here

Upvotes: 1

Related Questions