I'm using sromku to share score from my LibGDX game.
The feed was successfully published, but no one can see it but myself (even when my profile is seen by others).
Code:
public class AndroidLauncher extends AndroidApplication implements FacebookConn {
SimpleFacebook mSimpleFacebook;
OnPublishListener onPublishListener = new OnPublishListener() {
@Override
public void onComplete(String postId) {
Log.i("OnComplete", "Published successfully. The new post id = " + postId);
}
};
@Override
protected void onCreate (Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
Permission[] permissions = new Permission[] {
Permission.USER_PHOTOS,
Permission.EMAIL,
Permission.PUBLISH_ACTION,
};
SimpleFacebookConfiguration configuration =
new SimpleFacebookConfiguration.Builder()
.setAppId("410074072507300")
.setNamespace("sromkuapp")
.setPermissions(permissions)
.build();
SimpleFacebook.setConfiguration(configuration);
AndroidApplicationConfiguration config = new AndroidApplicationConfiguration();
config.useImmersiveMode = true;
initialize(new Jump4Love(this), config);
}
@Override
public void onResume() {
super.onResume();
mSimpleFacebook = SimpleFacebook.getInstance(this);
}
@Override
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
mSimpleFacebook.onActivityResult(this, requestCode, resultCode, data);
super.onActivityResult(requestCode, resultCode, data);
}
@Override
public void submitScore(int score) {
Feed feed = new Feed.Builder()
.setMessage("message")
.setName("name")
.setCaption("caption")
.setDescription("description")
.setPicture("picture")
.setLink("link")
.build();
// Note: the values above aren't the actual values I'm using
// I only simplified them so my code becomes easier to read
mSimpleFacebook.publish(feed, true, onPublishListener);
}
}
I found a similar case in StackOverflow here.
The OP said the following:
Only without using "link" and "picture" it does appear on my friend's News Feed
I tried removing the link and picture but the result was still the same, so my case is kinda different.
That post still has no acceptable answer btw.
======================================================================
It's useless to promote my game in Facebook if no one can see it.
I have seen posts from friends promoting other games, so I know it is possible.
Anyone has any idea why I'm having this problem?
You need to set your app “live”.
Go to Status & Review tab in app dashboard, on top you find
“Do you want to make this app and all its live features available to the general public?”
… that one you need to set to Yes.
Before setting this to Yes, your app is considered to be in “development mode”, and therefor posts made via it are not shown to users that do not have a role in your app (admin/developer/tester).