0

As I'm unable to log to Fb without sending a popup that's always blocked by browsers. In order to get around this problem, I'm trying to include the FB log button directly into the webcanvas. Once it's logged i can sent back to unity the user acces token. But I cannot see how to use this token with the actual unity Fb sdk. The CurrentAccessToken is a read value only, so i cannot remplace it with my browser user access token. Is there a way to achieve this?

Eidern
  • 68
  • 10
  • is FBLogin works on mobile.. did you try to test it on the editor before testing it on the web... I already created an project.. that you can check https://github.com/casterfile/Unity-Facebook-Soscial-Share – Tony Jul 30 '17 at 06:08
  • hello, thanks for the answer. Yes I've seen that FBLogin works well on my android build. AND it works well under the editor, I've got no problems with that. But under Webgl it's pain in the ass :( as the browser cannot see that the action of clicking to login button under unity, it reacts as if the log request wasn't set by the user clickin on something so it blocks. Did you manage in your project to get rid of the popup Block? – Eidern Jul 30 '17 at 08:23
  • Did you test my project. i think it works... what version of unity do you use?? – Tony Jul 30 '17 at 15:12
  • I've just tested it, It doesn't seem to work, it has a strange behaviour when I'm trying to log in the editor when you first have to click "find access token" to get your user token, it didn't show up any web fb page with user token.. I'm under Unity 5.6.2f1 and I've set in the fb settings my appID. and if you cancel it and try to log you get the error : You cannot show two modal windows at once. I've just launched your project as it is, no modifications or whatever – Eidern Jul 30 '17 at 17:05
  • did you try to add Web in Settings -> Basic... Add Platform Web... – Tony Jul 31 '17 at 08:58
  • Yes i am having problem with the popup... chrome blocks it... but try to unblock it.. manually.. then i just need to add the URL in Fb Developer Settings -> Basic... Add Platform Web – Tony Jul 31 '17 at 09:46

1 Answers1

0

I think have fix your problem... Check this URL: https://www.immersivemedia.ph/SocialSharing/

enter image description here

The github.com/casterfile/Unity-Facebook-Soscial-Share works you just need to add you Facebook APP ID. i have successfully this this without editing anything code. and finally export the app enter image description here

There you go.. hope this help.. Good Luck.

Tony
  • 112
  • 6
  • Hello thanks for your help, but Even with your url the pop up is blocked. You have to manually unblock it, but I can assure you that 80% of the users will not unblock it manually, I've tested it with multiple users that just end up saying that nothing appears and nothing works :( – Eidern Aug 01 '17 at 14:03
  • Yeah... that is a problem... i think the plugins need some update... sorry to hear that. i wish you the best... – Tony Aug 02 '17 at 14:52
  • Anyway I've found a way to get around this difficulty : turn the app into a facebook App. you have to get you app on a https server, and in the settings add Facebook app, and since the app is launched in Facebook The page does itself the job to login on Fb without no pop up blocked.. That's a weird way, but it's the noly one that i can think of – Eidern Aug 02 '17 at 19:51