0

At the moment, the module fboauth imports the photo of the person from facebook and adds it as his/her profile picture, when configured to do so. Later on, when the person changes his/her profile picture, the photo will not be updated at the site because subsequent logins only imports fbuid.

How can the user re-import the photo (or any profile data for that matter) at a later point of time, and update it at the profile here?

Please consider guiding me in the right direction and I will try to come up with some code. Will the hook fboauth_user_update() work for this? Or should I do the trouble of fetching, saving to server, and editing the db, etc? Please help.

1

its better to use Facebook realtime update https://developers.facebook.com/docs/graph-api/real-time-updates/v2.2

create your callback to handle this and register it with real time updates

do the following in your callback

1- load user from facebook ID you get it in the posted from facebook

2- get the new image from facebook

3- replace it with the current image

4- save user

or you can forget about real time update and replace the image whenever user login

here the code you can use

1- Make your action by Implementing hook_fboauth_actions().

2- use hook_user_login to call the action you create which grab the photo and update it

Thats all

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.