Failed to generate preview for user -- Facebook android SDK 4.2 -
i'm working on sharing place on facebook.
here's code
// create object shareopengraphobject object = new shareopengraphobject.builder() .putstring("og:type", "anewplace") .putstring("og:title", "paris") .putdouble("place:location:latitude", 10.7672788) .putdouble("place:location:longitude", 106.6877127) .build(); // create action shareopengraphaction action = new shareopengraphaction.builder() .setactiontype("come") .putobject("anewplace", object) .build(); // create content shareopengraphcontent content = new shareopengraphcontent.builder() .setpreviewpropertyname("anewplace") .setaction(action) .build(); sharebutton sharebutton = new sharebutton(this); sharebutton.setsharecontent(content); sharebutton.registercallback(callbackmanager, new facebookcallback<sharer.result>() { @override public void onsuccess(sharer.result result) { log.i(tag, "sharing success!"); } @override public void onerror(facebookexception error) { log.e(tag, "sharing error! - " + error.getmessage()); } @override public void oncancel() { log.w(tag, "sharing cancel!"); } }); sharebutton.performclick();
i got error : failed generate preview user
i followed documentation create custom story
please :) thanks
thanh
i found way :)
for action, should format "app_name:action_name" , object, should "app_name:object_name"
Comments
Post a Comment