FriendsOfSymfony / FOSFacebookBundle

NOT MAINTAINED - see https://github.com/hwi/HWIOAuthBundle
322 stars 140 forks source link

How do I override the array that goes into the initialize template? #314

Open tvl83 opened 10 years ago

tvl83 commented 10 years ago

I know this isn't for Q & A but I am not sure where else to put this.

I have been working on getting my app to detect and authorize a user if he is already logged into fb on another tab.

I did this by hunting around the fb dev docs and there's a parameter 'status' that, when set to true, checks if the user has already authorized the app id on their account and then goes through the login process in the background. The page refreshes with my user authenticated on my symfony app.

I would like to know if there is a way to override this in my code. I overrode a line in FacebookHelper.php. I can add to the readme docs to make this change to get this feature but I know it would be better to not have to modify the code of the bundle. I just don't know how to do it otherwise. I don't see any other way to call this FacebookHelper initialize function.

One other peculiarity is that it works in my ubuntu VM with both chrome and firefox but on my host desktop it does not. it detects the fact I am logged into facebook because the login button says "log out" but it does not forward and authenticate me as a user like in the ubuntu VM.

diegoholiveira commented 10 years ago

This is not one of the parameters that can be overrited on the bundle configuration. Can be a good ideia to add it to the bundle options.

So, can you send a PR with this improvement?