This week's book giveaway is in the OCP forum.
We're giving away four copies of OCP Java SE 8 Programmer II Exam Study Guide and have Kathy Sierra, Bert Bates, & Elizabeth Robson on-line!
See this thread for details.
Win a copy of OCP Java SE 8 Programmer II Exam Study Guide this week in the OCP forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Android Sharing Photo and Text together using ShareOpenGraphObject  RSS feed

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am trying to post image and text together thorough my android app but the share dialog appears with post link disabled and even the window disappears itself after few seconds with error: Failed to generate preview for user.. something wrong in my code?

SharePhoto photo1 = new SharePhoto.Builder()
.setBitmap(bi)
.setImageUrl(Uri.parse(recUrl))
.build();

ShareOpenGraphObject object = new ShareOpenGraphObject.Builder()
.putString("og:type", "healthsynergy.photo")
.putString("og:title", "food")
.putString("og:description", "This is a wonderful food.")
.putPhoto("og:image",photo1)
.build();


ShareOpenGraphAction action = new ShareOpenGraphAction.Builder()
.setActionType("healthsynergy.publish_actions")
.putObject("photo", object)
.build();
ShareOpenGraphContent content1 = new ShareOpenGraphContent.Builder()
.setPreviewPropertyName("photo")
.setAction(action)
.build();


shareDialog.show(content1);
XV429.png
[Thumbnail for XV429.png]
JHqli.png
[Thumbnail for JHqli.png]
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!