How to Invite Friends From Facebook to Android app ? - Gives Error

*爱你&永不变心* 提交于 2020-01-01 18:17:45

问题


I am working on an Android App. I am working to add "Invite Friend" feature to my app. It goes to my AppLinkUrl successfully but Show an Error.

My Manifest code is as below-

<!--Abhishek Tandon FB invitation Code-->
        <intent-filter>
            <action android:name="android.intent.action.VIEW" />
            <category android:name="android.intent.category.DEFAULT" />
            <category android:name="android.intent.category.BROWSABLE" />

            <data android:scheme="com.tandon.mynewsapp//https://my_fb_url_here" />
        </intent-filter>

And below is my Code for InviteFriend Activity-

//Abhishek Tanodn FB code for InviteFriend Activity
        FacebookSdk.sdkInitialize(getApplicationContext());
        Uri targetUrl = AppLinks.getTargetUrlFromInboundIntent(this, getIntent());
        if (targetUrl != null) {
            Log.i("Activity", "App Link Target URL: " + targetUrl.toString());

When I run this app I am redirected to Facebook page but I cannot see anything related to my app.

Please let me know where am I doing wrong.

OR Please tell me the right way to invite friend from Facebook to my Existing Android app.

Thank you in Advance !

来源:https://stackoverflow.com/questions/38677049/how-to-invite-friends-from-facebook-to-android-app-gives-error

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!