Questions regarding Facebook sharing functionality — Oculus
Welcome to the Oculus Developer Forums!

Your participation on the forum is subject to the Oculus Code of Conduct.

In general, please be respectful and kind. If you violate the Oculus Code of Conduct, your access to the developer forums may be revoked at the discretion of Oculus staff.

Questions regarding Facebook sharing functionality

Thunderbox.EntThunderbox.Ent Posts: 55 Oculus Start Member
edited November 2018 in Oculus Go Development
Hi there!
I am currently implementing social sahring in my app, using Platform.Media.ShareToFacebook, as described here.
It seems to be working as intended for the most part, but I noticed a few oddities.

The first time I fire it it works nicely...
  • My app goes to the background, and the user sees the Oculus Dash
  • The user sees thre animated dots in front of them (i.e a loading timer)
  • After a breif ait, the sharing dialogue appears with my image and message
  • Image is shared to Facebook
  • User is returned to my app
The next time it is fired, however,  the user goes to the dash, but the timer appears to the left of the player (out of the field of view) and never seems to complete.

A quick look at my log shows the following, suspicious-looking error...

11-22 14:41:00.706: E/FbConnectHelper(20781): Failed to query FB auth token from Horizon
11-22 14:41:00.706: E/FbConnectHelper(20781): java.lang.SecurityException: Component access not allowed.
11-22 14:41:00.706: E/FbConnectHelper(20781): at android.os.Parcel.readException(Parcel.java:1684)
11-22 14:41:00.706: E/FbConnectHelper(20781): at android.database.DatabaseUtils.readExceptionFromParcel(DatabaseUtils.java:183)
11-22 14:41:00.706: E/FbConnectHelper(20781): at android.database.DatabaseUtils.readExceptionFromParcel(DatabaseUtils.java:135)
11-22 14:41:00.706: E/FbConnectHelper(20781): at android.content.ContentProviderProxy.query(ContentProviderNative.java:421)
11-22 14:41:00.706: E/FbConnectHelper(20781): at android.content.ContentResolver.query(ContentResolver.java:534)
11-22 14:41:00.706: E/FbConnectHelper(20781): at android.content.ContentResolver.query(ContentResolver.java:475)
11-22 14:41:00.706: E/FbConnectHelper(20781): at com.oculus.fbconnecthelper.FbConnectHelper.queryFbAuthTokenFromHorizon(FbConnectHelper.java:76)
11-22 14:41:00.706: E/FbConnectHelper(20781): at com.oculus.fbconnecthelper.FbConnectHelper.getFbAuthToken(FbConnectHelper.java:113)
11-22 14:41:00.706: E/FbConnectHelper(20781): at com.oculus.analytics.SimpleUploader.getAccessToken(SimpleUploader.java:44)
11-22 14:41:00.706: E/FbConnectHelper(20781): at com.facebook.analytics2.uploader.okhttp3.OkHttp3AnalyticsUploader.createRequest(OkHttp3AnalyticsUploader.java:119)
11-22 14:41:00.706: E/FbConnectHelper(20781): at com.facebook.analytics2.uploader.okhttp3.OkHttp3AnalyticsUploader.upload(OkHttp3AnalyticsUploader.java:89)
11-22 14:41:00.706: E/FbConnectHelper(20781): at com.facebook.analytics2.logger.UploadProcessor.uploadNext(UploadProcessor.java:49)
11-22 14:41:00.706: E/FbConnectHelper(20781): at com.facebook.analytics2.logger.UploadJobHandler.doMaybeUploadNext(UploadJobHandler.java:183)
11-22 14:41:00.706: E/FbConnectHelper(20781): at com.facebook.analytics2.logger.UploadJobHandler.handleMessage(UploadJobHandler.java:86)
11-22 14:41:00.706: E/FbConnectHelper(20781): at android.os.Handler.dispatchMessage(Handler.java:102)
11-22 14:41:00.706: E/FbConnectHelper(20781): at android.os.Looper.loop(Looper.java:154)
11-22 14:41:00.706: E/FbConnectHelper(20781): at android.os.HandlerThread.run(HandlerThread.java:61)

Here is a snippet of my code for you to check out (I am using PlayMaker in Unity)...
        Media.ShareToFacebook(message.Value, imagePath.Value, MediaContentType.Photo).OnComplete(callbackMethod);

        public void callbackMethod(Message msg)
        {
            if (!msg.IsError)
            {
                if (msg.GetShareMediaResult().Status == ShareMediaStatus.Shared)
                {
                    Debug.Log("Image was successfully shared.");
                    Fsm.Event(success);
                }
                else
                {
                    Debug.Log("Image not shared.");
                    Fsm.Event(fail);
                }
                    
            }
            else
            {
                Debug.LogError("Image sharing error.");
                Fsm.Event(fail);
            }
        }
    }
}

One other thing I noticed is that the text message is not shared unless the user edits it. Is this the intended functionality, or a bug, or an error on my behalf?

Thanks in advance for your assistance!

Cheers,
Dan

Comments

Sign In or Register to comment.