android - Link sharing is not working when native facebook application is installed -


in application have share button shares application link facebook wall.this how doing it.

    facebooksdk.sdkinitialize(getactivity());          sharelinkcontent content = new sharelinkcontent.builder()                 .setcontenturl(                         uri.parse(preferencemanager                                 .getdefaultsharedpreferences(                                         getactivity()                                                 .getapplicationcontext())                                 .getstring("referral_only_url", "")))                 .build();          sharedialog.show(getactivity(), content); 

now problem works fine web dialog if facebook native application not installed in device if native facebook app installed fails error saying:

we sorry post no longer available. may have been removed

any appreciated.

probably not using same app name facebook app name .

   <meta-data         android:name="com.facebook.sdk.applicationname"         android:value="@string/app_name" /> 

here app_name must same app name specified in facebook

example :

if app in facebook registered

mytest_android

you have use same name

mytest_android

if try change it,you"ll catch facebookexception in onerror()

failed authenticate application because of app name mismatch. please check application name configured dialog.


Comments

Popular posts from this blog

html - Firefox flex bug applied to buttons? -

html - Missing border-right in select on Firefox -

c# - two queries in same method -