Open graph news.reads not working
I am having problems with my exchange dialog. When I use an action like books.reads everything works, ShareDialog works and publishes news to facebook, but when I use news.reads or news.publishes, the dialog like share only appears when I try to share with developer's facebook account.
books.reads works well:
ShareOpenGraphObject object = new ShareOpenGraphObject.Builder()
.putString("og:type", "books.book")
.putString("og:url", "http://www.google.com")
.putString("og:title", "title")
.putString("og:description", "text")
.putString("og:image","imageURL")
.putString("books:isbn", "0-553-57340-3")
.build();
ShareOpenGraphAction action = new ShareOpenGraphAction.Builder()
.setActionType("books.reads")
.putObject("book", object)
.build();
ShareOpenGraphContent content = new ShareOpenGraphContent.Builder()
.setPreviewPropertyName("book")
.setAction(action)
.build();
ShareDialog shareDialog = new ShareDialog(this);
shareDialog.show(content);
news.reads only works for developer facebook account and SareDialog doesn't show for other accounts:
ShareOpenGraphObject object = new ShareOpenGraphObject.Builder()
.putString("og:type", "article")
.putString("og:url", "http://www.google.com")
.putString("og:title", "title")
.putString("og:description", "text")
.putString("og:image","imageURL")
.build();
ShareOpenGraphAction action = new ShareOpenGraphAction.Builder()
.setActionType("news.reads")
.putObject("article", object)
.build();
ShareOpenGraphContent content = new ShareOpenGraphContent.Builder()
.setPreviewPropertyName("article")
.setAction(action)
.build();
ShareDialog shareDialog = new ShareDialog(this);
shareDialog.show(content);
facebook return error message: "{FacebookServiceException: httpResponseCode: -1, facebookErrorCode: 100, facebookErrorType: null, message: Application 2012491665000000 is not allowed to create actions of type news: read for user 115892459000000}"
Do I need to get any permissions or am I missing something?
source to share
No one has answered this question yet
Check out similar questions: