Android Facebook sdk 3.5 share dialog -


hi implementing facebook share dialog android sdk 3.5 not getting success im following guides..

facebookdialog sharedialog = new facebookdialog.sharedialogbuilder(myclass.this)                             .setapplicationname("app name")                             .setname("name")                             .setlink("mylink")                             .build(); 

i put inside on touch method there no errors appearing whenever click button.. nothing appears also~

is myclass.this wrong? reply~

this facebook recommends. i've copied code examples this link explained how handle uihelper instance.

if don't care results of dialog might ok not use uihelper.

using static method check whether dialog can presented prudent because initializes builder , creates dialog if possible present it.

if (facebookdialog.canpresentsharedialog(getapplicationcontext(), facebookdialog.sharedialogfeature.share_dialog)) {     // publish post using share dialog     facebookdialog sharedialog = new facebookdialog.sharedialogbuilder(this)             .setlink("https://developers.facebook.com/android")             .build();     uihelper.trackpendingdialogcall(sharedialog.present());  } else {     // fallback. example, publish post using feed dialog     publishfeeddialog(); } 

and feed dialog fallback:

private void publishfeeddialog() {     bundle params = new bundle();     params.putstring("name", "facebook sdk android");     params.putstring("caption", "build great social apps , more installs.");     params.putstring("description", "the facebook sdk android makes easier , faster develop facebook integrated android apps.");     params.putstring("link", "https://developers.facebook.com/android");     params.putstring("picture", "https://raw.github.com/fbsamples/ios-3.x-howtos/master/images/iossdk_logo.png");      webdialog feeddialog = (             new webdialog.feeddialogbuilder(getactivity(),                     session.getactivesession(),                     params)).build();     feeddialog.show(); } 

Comments

Popular posts from this blog

html - How to style widget with post count different than without post count -

How to remove text and logo OR add Overflow on Android ActionBar using AppCompat on API 8? -

javascript - storing input from prompt in array and displaying the array -