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

0

2

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.

I got error that page is not available

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 !

Hefner answered 30/7, 2016 at 18:11 Comment(9)
The XML is according to develper.facebook.com tutorial..Hefner
please post full code, that how are you triggering facebook dialog.Calisaya
Did you have to create a Facebook app on developer.facebook.com as part of this? If so, ensure that your app is available to users outside of those added as collaborators...Denicedenie
@jesses】 I have created app on developer.facebook.com but how can I ensure that it is available to users. Please tell me the right way you know to check this. thanks.Hefner
@Rah - I have posted the code that I am using for Facebook invite. This is full code that redirect me to Facebook page bu doesn't show anything. What else you know to add in this code ? Please reply with your method. Thanks.Hefner
The toggle that I am thinking about is under "App Review" and says "Make (APP_NAME) Public" ... by default is not, and says "YesNo Your app is in development and unavailable to the public."Denicedenie
1). test on 2-3 devices, 2).remove facebook app from mobile and try once again, 3). update facebook sdk version.Calisaya
@jesses】You are really a brilliant guy. I follow your suggestion and find the app almost working. but I am having problem again. Hope you will help me once again...Problem is that my app is working (no error or crashes) and showing Friends name list to invite, but when I send invitation to my friend they do not get any Notification (push notification) or any link to install my app. why it is happening. I really appreciate your knowledge. Thank you once again !Hefner
@AbhishekTandon the best way to achieve that would be through AppInviteContent and AppInviteDialog from FB SDK. You can have a look how we did that at GetSocial.im (I'm on the team there) docs.getsocial.im/guides/smart-invites/android/essential-setupMaddox

© 2022 - 2024 — McMap. All rights reserved.