fuse-open / fuse-samples

A collection of smaller examples using the various features of Fuse and FuseJS
MIT License
182 stars 153 forks source link

Show how to get data out of the AccessToken in NativeFacebookLogin #35

Open ollef opened 7 years ago

ollef commented 7 years ago

Several users have asked for this.

jesusmartinoza commented 7 years ago

I made the code for android but can't find the NativeFacebookLogin project :/

jesusmartinoza commented 7 years ago

Here is the code for android https://github.com/Betobit/fuse-samples/tree/master/Samples/NativeFacebookLogin

When I finish the iOS version I do a pull request :)

ollef commented 7 years ago

Wow, nice work!

The original code is on the feature-NativeFacebookLogin branch, so make the PR against that. It'll be merged to master eventually, but is on a branch for internal reasons (specifically because it uses Gradle, which requires a non-standard Uno flag which messes with our internal testing).

jesusmartinoza commented 7 years ago

Oh I missed that! A PR will be done, thank you.

jmoleiro commented 7 years ago

Hi!

I tried the sample project for Native Facebook Login (https://github.com/fusetools/fuse-samples/tree/feature-NativeFacebookLogin/Samples/NativeFacebookLogin) and it seems to compile without warning, but when i tried it on an Android device, i get this exception

Uno.Exception: The SDK has not been initialized, make sure to call FacebookSdk.sdkInitialize() first.
   at Android.Base.JNI.TryGetException(Android.Base.Primitives.JNIEnvPtr,[string])
   at Android.Base.JNI.CheckException(Android.Base.Primitives.JNIEnvPtr,[string])
   at Android.Base.JNI.CheckException(Android.Base.Primitives.JNIEnvPtr)
   at FacebookLoginModule.FacebookLoginPromise.Login()
   at Fuse.UpdateListener.Invoke()
   at Fuse.UpdateManager.ProcessOnces(Fuse.Stage,Uno.Collections.List<Uno.Exception>&)
   at Fuse.UpdateManager.Update(Fuse.Stage)
   at Fuse.UpdateManager.ProcessStages()
   at Fuse.UpdateManager.Update()
   at Outracks.Simulator.Client.Application.OnUpdate()
   at Fuse.App.OnTick(object,Uno.Platform.TimerEventArgs)
   at Uno.Platform.Display.OnTick(Uno.Platform.TimerEventArgs)
   at Uno.Platform.AndroidDisplay.OnFrameCallback(double,double)

I get this error with the sample project. Tried on a new project i get the same error.

On iOS it works ok. Any ideas?

jesusmartinoza commented 7 years ago

Hi! That's the official repo. Try with my fork and tell me how it works :)

Here is the link: https://github.com/jesusmartinoza/fuse-samples

Regards!