Question

I'm trying to make invite friends dialog using Unity Facebook sdk:s FB.AppRequest() call. Apprequest itself works fine and recipient gets the notification. If game is not installed on device it opens request to browser instead of google play store.

However if user has the game installed, notification leads correctly to game. Game can be found from facebook AppCenter and opens correct play store link from there.

a) Am I misunderstood that notification should open play store if game is not installed?

b)Is there place for play store url somewhere (I guess not while Facebook settings can lookup playstore images correctly)

c)Should it be submitted to Facebook Appcenter?

Game is published to play store and it is not sandboxed in facebook.

Current settings

Manifest

<?xml version="1.0" encoding="utf-8"?>
<manifest
    xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.tuokio.smashtheschool"
    android:versionCode="5"
    android:versionName="0.4">
    <supports-screens
        android:smallScreens="true"
        android:normalScreens="true"
        android:largeScreens="true"
        android:xlargeScreens="true"
        android:anyDensity="true"/>

    <application
        android:icon="@drawable/app_icon"
        android:label="@string/app_name"
        android:largeHeap="true"
        android:debuggable="true">

        <activity android:name="com.prime31.UnityPlayerNativeActivity" android:screenOrientation="sensorLandscape"
                  android:launchMode="singleTask"
                  android:label="@string/app_name"
                  android:configChanges="fontScale|keyboard|keyboardHidden|locale|mnc|mcc|navigation|orientation|screenLayout|screenSize|smallestScreenSize|uiMode|touchscreen">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
            <meta-data android:name="unityplayer.ForwardNativeEventsToDalvik" android:value="true" />
        </activity>

        <activity android:name="com.unity3d.player.VideoPlayer"
                  android:label="@string/app_name"
                  android:screenOrientation="landscape"
                  android:configChanges="fontScale|keyboard|keyboardHidden|locale|mnc|mcc|navigation|orientation|screenLayout|screenSize|smallestScreenSize|uiMode|touchscreen">
        </activity>

        <!---REMOVED NON RELATED ACTIVITIES 


        -->

        <!-- FB -->
         <activity android:name="com.facebook.unity.FBUnityLoginActivity" android:configChanges="fontScale|keyboard|keyboardHidden|locale|mnc|mcc|navigation|orientation|screenLayout|screenSize|smallestScreenSize|uiMode|touchscreen" android:theme="@android:style/Theme.Translucent.NoTitleBar.Fullscreen">
        </activity>
        <activity android:name="com.facebook.LoginActivity" android:screenOrientation="sensorLandscape" android:configChanges="keyboardHidden|orientation" android:theme="@android:style/Theme.Translucent.NoTitleBar.Fullscreen">
        </activity>
        <activity android:name="com.facebook.unity.FBUnityDeepLinkingActivity" android:exported="true">
        </activity>
        <meta-data android:name="com.facebook.sdk.ApplicationId" android:value="\ 1378812695724198" />


    </application>

    <!-- PERMISSIONS -->
    <uses-permission android:name="android.permission.INTERNET"/>
    <uses-permission android:name="com.android.vending.BILLING" />
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />

    <!-- PLEASE NOTE: Using this permission changes Application.persistentDataPath to always return external storage path! android.permission.WRITE_EXTERNAL_STORAGE -->
    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>

    <uses-permission android:name="android.permission.READ_PHONE_STATE" />
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />

    <!-- Must add the GET_ACCOUNTS and USE_CREDENTIALS perimissions to support Google auth -->
    <uses-permission android:name="android.permission.GET_ACCOUNTS" />
    <uses-permission android:name="android.permission.USE_CREDENTIALS" />

    <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>

    <uses-permission android:name="android.permission.GET_TASKS"/>
    <uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />

    <uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" />
    <uses-permission android:name="android.permission.VIBRATE" />

    <uses-feature android:glEsVersion="0x00020000" />
    <uses-sdk android:minSdkVersion="15" android:targetSdkVersion="17" />

</manifest>

Facebook settings Basic settings Advanced settings Migrations Platforms permissions Unity settings

Thanks for advance!

Was it helpful?

Solution

I don't know if you're still searching for an answer but I think your question about submission to Facebook App Center was right.

I was having the same problem and my app wasn't submitted to Facebook as I was only using "standard" permissions (public_profile & user_friends doesn't require Facebook review). I thought that maybe submitting the app for review (only the "App Details" part) may help so I tested a simple request just before submitting and it still wasn't working. I submitted my app to Facebook (just the "App Details" part) in order to be listed in the App Center. Just after review and that my app has been accepted, I ran again a simple request and now everything seems to be working just fine. An app request opened on Android launch the Play Store if the app isn't installed or directly launch the app otherwise.

I can't say if it's a general rule because I can't find any documentation that support this idea but for me that makes sense (as the app is not listed on the app center and the Facebook app on the device cannot find any information about your application).

Hope this helps.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top