Has anyone else done this? What's the best way to collect extra information about a facebook user, the first time they sign in with facebook connect? How do I know it's their first time, and how should I override the default Signin function to do this? Thanks, Zach
On Feb 8, 11:45 am, Zach <[email protected]> wrote: > I have a question regarding the getSfGuardUserByFacebookSession > function of the sfFacebook class. > > I am overriding the BasesfFacebookConnectAuthActions executeSignin() > function to see if an sfGuardUser has been created and if not redirect > to a different page to confirm some details and add the email and > phone number. I tried calling > getSfGuardUserByFacebookSession(false,true) thinking that it wouldn't > create a user since I passed false for the create paramter. But > apparently it does create a Guard User. Here's my code: > > public function executeSignin() > { > $sfGuardUser = > sfFacebook::getSfGuardUserByFacebookSession(false,true); > if($sfGuardUser){ > ...execute some irrelevant code... > }else{ > //if the guard user has not yet been created, set the > forward parameter to redirect to, in the base signin function > > $this->getRequest()->setParameter('forward','mymodule/myaction'); > } > BasesfFacebookConnectAuthActions::executeSignin(); > > } > > It never executes the else and therefor the forward parameter is never > set. So I cannot redirect to save some information from the facebook > user. > Perhaps I am misunderstanding the purpose of the create parameter or > maybe I have the completely wrong approach. > Thanks in advance for your time and help. > > Zach > > On Dec 29 2009, 7:00 am, Fabrice Bernhard <[email protected]> wrote: > > > > > I would definitely check the configuration. > > > To get the Facebook UID in a website, you need Facebook Connect to be > > perfectly configured and to not forget the publish-assets command for > > the html file to be visible. > > > To get the Facebook UID in a Facebook app, you need to test inside the > > Facebook frame. > > > Fabrice > > > On Dec 28, 2:15 pm, Andrés Cristi <[email protected]> wrote: > > > > Yes, i'm testing on an internet-accessible server. I will see if > > > there's something wrong on the configuration of the application on > > > facebook. > > > Thank's > > > > On 24 dic, 17:00, Fabrice Bernhard <[email protected]> wrote: > > > > > Are you testing on an internet-accessible server ? To get the Facebook > > > > uid, you need Facebook servers to see your server. > > > > > Fabrice > > > > > On Dec 21, 6:32 pm, Andrés Cristi <[email protected]> wrote: > > > > > > Currently i'm having a similar problem. > > > > > I'm working with symfony 1.4+sfDoctrineGuardPlugin. > > > > > My problem is that the the user seems to be null, so when it is saved > > > > > to the database, the username is saved like Facebook_, when it should > > > > > be something like "Facebook_".$FacebookUserId. > > > > > I've read the documentation from the advent calendar and i still > > > > > haven't found how to solve this. > > > > > > Cheers, > > > > > Andrés > > > > > > On 8 dic, 23:27, Hardeep Khehra <[email protected]> wrote: > > > > > > > Not sure what I'm doing wrong, but for starters i'm beginning a > > > > > > fresh > > > > > > project using symfony 1.4, but I can't get this plugin to work for > > > > > > the > > > > > > life of me. > > > > > > > I've followed all the instructions and cannot get this plugin to > > > > > > work > > > > > > using sfDoctrineGuardPlugin. > > > > > > > The facebook dialog appears and i can log into facebook, but the > > > > > > user > > > > > > is never added to the database. > > > > > > > I installed the plugin by downloading the packaging and unzipping to > > > > > > the plugins folder. > > > > > > > On Dec 8, 7:46 am, Fabrice Bernhard <[email protected]> wrote: > > > > > > > > Hi Zach, > > > > > > > > You don't need any sfFacebookConnect filters in a standard > > > > > > > implementation. > > > > > > > > Better documentation will soon be online as part of the symfony > > > > > > > 2009 > > > > > > > advent calendar :-) > > > > > > > > Cheers, > > > > > > > > Fabrice > > > > > > > --http://www.theodo.fr > > > > > > > > On Dec 8, 7:28 am, Alexandre Salomé <[email protected]> > > > > > > > wrote: > > > > > > > > > Hi, > > > > > > > > > You should contact the author of the plugin to have more > > > > > > > > informations, or > > > > > > > > look for a README file or an INSTALL file. > > > > > > > > > Alexandre > > > > > > > > > 2009/12/7 Zach <[email protected]> > > > > > > > > > > I have run into another error... > > > > > > > > > > I am running the sfFacebookConnectDemo. It prompts me to > > > > > > > > > connect, I > > > > > > > > > enter my facebook email and password, click connect, and I > > > > > > > > > get this > > > > > > > > > error: > > > > > > > > > > Strict Standards: Non-static method > > > > > > > > > sfFacebookGuardAdapter::getUserProfileProperty() should not > > > > > > > > > be called > > > > > > > > > statically, assuming $this from incompatible context in > > > > > > > > > /var/www/ > > > > > > > > > losebig/plugins/sfFacebookConnectPlugin/lib/ > > > > > > > > > sfFacebookApplicationFilter.class.php on line 25 > > > > > > > > > > Fatal error: Cannot call abstract method > > > > > > > > > sfFacebookGuardAdapter::getUserProfileProperty() in > > > > > > > > > /var/www/losebig/ > > > > > > > > > plugins/sfFacebookConnectPlugin/lib/ > > > > > > > > > sfFacebookApplicationFilter.class.php on line 25 > > > > > > > > > > If I refresh the page, it says "Welcome Zach Fry" and has my > > > > > > > > > facebook > > > > > > > > > profile picture. I'm not sure how I am supposed implement the > > > > > > > > > filters, > > > > > > > > > and wondered if someone could show me what the filters.yml > > > > > > > > > file is > > > > > > > > > supposed to look like. I don't really know where my problem > > > > > > > > > lies, but > > > > > > > > > I thought it might be the filters since I didn't know what I > > > > > > > > > was doing > > > > > > > > > when I implemented those. here is my current file: > > > > > > > > > > rendering: ~ > > > > > > > > > web_debug: ~ > > > > > > > > > > facebook_connect: > > > > > > > > > class: sfFacebookConnectFilter > > > > > > > > > > security: > > > > > > > > > class: sfGuardBasicSecurityFilter > > > > > > > > > > facebook_application: > > > > > > > > > class: sfFacebookApplicationFilter > > > > > > > > > > sfFacebookConnectRememberMe: > > > > > > > > > class: sfFacebookConnectRememberMeFilter > > > > > > > > > > #sfFacebookSecurity: > > > > > > > > > # class: sfFacebookSecurityFilter > > > > > > > > > > cache: ~ > > > > > > > > > common: ~ > > > > > > > > > flash: ~ > > > > > > > > > execution: ~ > > > > > > > > > > Thanks for your help. > > > > > > > > > I've been struggling getting all this to work right. > > > > > > > > > > On Dec 3, 5:27 pm, Fabrice Bernhard <[email protected]> > > > > > > > > > wrote: > > > > > > > > > > Great you managed to solve your problem, although it would > > > > > > > > > > have been > > > > > > > > > > nice to actually see what you did wrong. > > > > > > > > > > > Cheers, > > > > > > > > > > > Fabrice > > > > > > > > > > --http://www.theodo.fr > > > > > > > > > > -- > > > > > > > > > > You received this message because you are subscribed to the > > > > > > > > > Google Groups > > > > > > > > > "symfony users" group. > > > > > > > > > To post to this group, send email to > > > > > > > > > [email protected]. > > > > > > > > > To unsubscribe from this group, send email to > > > > > > > > > [email protected]<symfony-users%2bunsubscr...@goog > > > > > > > > > legroups.com> > > > > > > > > > . > > > > > > > > > For more options, visit this group at > > > > > > > > >http://groups.google.com/group/symfony-users?hl=en. > > > > > > > > > -- > > > > > > > > Alexandre Salomé -- [email protected] Hide quoted > > > > > > > > text - > > > > > > > > - Show quoted text - -- You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en.
