First of all thanks a lot for creating this module. It works amazingly and solves all the problem without writing a single line of code.
Now the problem is, I'm a theme developer and being a theme developer, I'm unable to get the additional FB fields (date of birth, gender, native place. etc.) via views.
What is the best way to get this thing work? I tried creating a custom module but it's going over my head, can't we have it simply by some clicks? If not, can you please guide me through custom module development? I will learn and will try to implement it.
I know I can google it and can start but I need to get this thing done and get started on it, your little help can help me a lot.
Thanks a lot for the great help.
Cheers
Comments
Comment #2
masipila CreditAttribution: masipila commentedHi,
You need to first add the fields that you want to the Drupal user object normally. For example the gender.
Then, you need to create a small module that reacts to the user creation event dispatched by Simple Fb Connect when the user is created. In this module, you need to make an API call to Facebook and read the field (e.g. gender) from Facebook and save the value to the Drupal user field thst you had created.
There is already a sample moduke in the module handbook, see https://www.drupal.org/docs/8/modules/simple-fb-connect/eventsubscriber-...
Cheers,
Markus
Comment #3
themes mania CreditAttribution: themes mania commentedOk, I have created the module as documented and enabled it successfully.
Now as you said, I created two fields for the profile at admin/config/people/accounts/fields as: -
I created a module with name "fbprofile" And in fbprofile/src/EventSubscriber/FBProfileSubscriber.php, at line number 114, I added the following code: -
Here I added first name, last name and gender as I found it on https://developers.facebook.com/docs/graph-api/reference/user.
Good thing is, I'm able to print values for the first name, last name, and gender on successful registration in the Drupal set message but how do I save the value to the Drupal user field that I have created.
I feel I'm pretty close, you have been a great help so far, your little help can make this thing a lot easier.
Cheers
Comment #4
themes mania CreditAttribution: themes mania commentedThanks a bunch for this Awesome Module!!
Comment #5
masipila CreditAttribution: masipila commentedYour welcome and I'm glad that you got it working with the help of the documentation!
I noticed that you changed this support request back to critical after I had changed it to normal. I feel a bit triggered. Please take the following as constructive feedback.
Many (if not most) contrib modules are maintained on the maintainer's free time. This module is one of them. I understand that this support request is important for you but please understand that from module maintainer's point of view only a bug that prevents the whole module from working on all / most sites could be considered critical. By repeatedly flagging your support requests critical, especially after you got a response in a matter of hours, can be easily considered disrespectful towards the volunteer work that I'm doing as a module maintainer.
Having said all this, I'm really glad that you find this module useful and that the example in the module handbook was helpful!
Cheers,
Markus
Comment #6
themes mania CreditAttribution: themes mania commentedI'm new to this, will surely take care. Thanks a lot for the quick response.
Cheers