Answers.Body: <p>Joomla contains a set of packages for connecting to social sites (<a href="https://github.com/joomla/joomla-cms/tree/staging/libraries/joomla/facebook">Facebook</a>, <a href="https://github.com/joomla/joomla-cms/tree/staging/libraries/joomla/linkedin">LinkedIn</a>, <a href="https://github.com/joomla/joomla-cms/tree/staging/libraries/joomla/google">Google</a>, <a href="https://github.com/joomla/joomla-cms/tree/staging/libraries/joomla/twitter">Twitter</a>, <a href="https://github.com/joomla/joomla-cms/tree/staging/libraries/joomla/github">Github</a>, there may be more).   If you are using Joomla you can instantiate one of these to collect the link data as well as other data the user authorizes, just as you see a lot of places you make a button to submit the request to whatever api it is. They all follow the same pattern, once you do it once it should be easy to do additional ones.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-03-29T20:22:26.387Z
Answers.LastActivityDate: 2015-03-29T20:22:26.387Z
Answers.UserDisplayName: Elin
Answers.Body: <p>For FB, if the user entered the big ugly profile.php URL, you can get the shortlink (and profile pic) very easily using the Graph API, like this: <code>http://graph.facebook.com/4?fields=link,picture</code>. In our example, 4 is the user ID for Zuckerberg. If you have some JavaScript skills you could add a button to your contact template that allows the user to convert this. If not, your membership manager can just paste the URL into a browser location bar with the correct ID, press enter, and then copy-paste the short link and/or profile photo. You don't even need to be logged into FB to do this.</p>
  
  <p>Edit: After some more reading, the Graph API has deprecated the option to get the pretty username link for the logged in user. Every user now gets a unique id for every FB app. So that part kind of stinks and makes my lookup idea unreliable. To make up for it, here is a bit of JS to get you started with your FB button on the profile:</p>
  
  <pre><code>  window.fbAsyncInit = function() {
      FB.init({
        appId      : 'your app id here',
        xfbml      : true,
        version    : 'v2.3',
    status     : true
      });
    };
  
    (function(d, s, id){
       var js, fjs = d.getElementsByTagName(s)[0];
       if (d.getElementById(id)) {return;}
       js = d.createElement(s); js.id = id;
       js.src = "//connect.facebook.net/en_US/sdk.js";
       fjs.parentNode.insertBefore(js, fjs);
     }(document, 'script', 'facebook-jssdk'));
  
  
  CRM.$(function($) {
  
      FB.api('/me', {fields: 'first_name,last_name,address,birthday,email,picture{url},link'}, function(response) {
  
          console.log(response);
  
      });
  
  });
  </code></pre>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-05-19T14:42:11.470Z
Answers.Text: Thanks. We wouldn't mind retrieving and storing the unique Facebook ID— arguably, it would be better. But simultaneously for people who *have* chosen a handle/shortlink, it's not easy to find, and whatever it is that we store, the ideal would be a one-click solution.
Answers.UserDisplayName: choster
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-03-27T13:58:53.013Z
Answers.LastActivityDate: 2015-03-27T15:39:28.413Z
Answers.LastEditDate: 2015-03-27T15:39:28.413Z
Answers.UserDisplayName: Nicholai
Answers.Body: <p>I would definitely agree with @Elin - the cleanest solution is to request the user Oauth/login to the respective service.  In drupal there are many modules to do this (e.g. <a href="https://www.drupal.org/project/oauth" rel="nofollow">Drupal Oauth</a>, <a href="https://www.drupal.org/project/oauthconnector" rel="nofollow">Oauth connector</a>, 3rd party services like <a href="https://www.drupal.org/project/rpx" rel="nofollow">Janrain</a> or my favorite: <a href="https://www.drupal.org/project/hybridauth" rel="nofollow">HybridAuth</a>)</p>
  
  <p>Many provide Drupal rules integration or tokens which can even be added to civicrm (with the <a href="https://www.drupal.org/project/civicrm_entity" rel="nofollow">civicrm_entity</a> module for example.)</p>
  
  <p>The best part about getting the user to authenticate is you can access additional info like their user image, post to their wall, etc.</p>
  
  <p>I've used <a href="https://www.drupal.org/project/fb_autopost" rel="nofollow">Facebook Autopost</a> for example, to post new events on behalf of users.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-04-06T21:18:51.467Z
Answers.LastActivityDate: 2015-04-06T21:18:51.467Z
Answers.UserDisplayName: Sonicthoughts
Answers.Body: <p>There are two social media integration projects for this summer's Google Summer of Code. See <a href="https://civicrm.org/blogs/achia/social-media-integration-civicrm-ii" rel="nofollow">https://civicrm.org/blogs/achia/social-media-integration-civicrm-ii</a> (and posts on the <a href="http://forum.civicrm.org/index.php/topic,36315.msg155084.html#msg155084" rel="nofollow">http://forum.civicrm.org/index.php/topic,36315.msg155084.html#msg155084</a> forum thread) and <a href="http://forum.civicrm.org/index.php/topic,36059.0.html" rel="nofollow">http://forum.civicrm.org/index.php/topic,36059.0.html</a>. Although both have been accepted, I'm not sure how much activity has occurred on the latter project. Various students are starting their work at various times, but I think s0014 should be posting by now.</p>
  
  <p>I'd encourage working with the students and their mentors to try to ensure their work meets your needs. BTW, what are/were the criteria for awarding the bounty?</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-05-25T17:19:01.830Z
Answers.Text: I'm basically asking if there's a way to collect whichever identifier is necessary to create a link to someone's Facebook or LinkedIn profile. For instance, the fbid number would be fine e.g. *[4](https://www.facebook.com/profile.php?id=4)*, or the shortlink would be fine, e.g. *[zuck](https://www.facebook.com/zuck)*, whether it is populating a field by clicking on a link or copying it from OAuth credentials stored in the CMS, or by some other mechanism.
Answers.UserDisplayName: choster
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-05-25T16:31:26.503Z
Answers.LastActivityDate: 2015-05-25T16:31:26.503Z
Answers.UserDisplayName: Joe Murray
Answers.Body: <p>The <a href="http://Attentive.ly">http://Attentive.ly</a> CiviCRM integration automatically returns the social media accounts that match with over a hundred social media sites including Twitter, LinkedIn, Facebook, Google+, Klout, etc., as well as social listening on relevant recent posts to Twitter and Facebook. It does a lot more to help improve your organization's online engagement with top influencers (meaning those that have a high Klout score). The service is not free, and works best for organizations that have at least 25,000 - 50,000 contacts. See <a href="https://civicrm.org/extensions/attentively-integration">https://civicrm.org/extensions/attentively-integration</a>.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-01-08T16:40:28.010Z
Answers.Text: Unfortunately this extension is no longer supported or maintained.
Answers.UserDisplayName: William Mortada
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-01-18T00:57:33.340Z
Answers.Text: Attentive.ly was bought by Blackbaud who shut down the API used by the extension, so we marked extension as no longer maintained.
Answers.UserDisplayName: Joe Murray
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-03-31T20:04:53.790Z
Answers.LastActivityDate: 2015-05-13T22:50:04.880Z
Answers.LastEditDate: 2015-05-13T22:50:04.880Z
Answers.UserDisplayName: Joe Murray
Body: <p>Collecting Twitter handles from users is straightforward: create a custom field, ask for the handle. But collecting links to Facebook or LinkedIn profiles is more tedious, since most people don't remember their shortlinks offhand, and probably even more people aren't even aware that they can choose a shortlink in the first place. Thus, their profiles have long, immemorable URLs like</p>
  
  <p><a href="http://us.linkedin.com/pub/john-doe/921/487/383" rel="nofollow">http://us.linkedin.com/pub/john-doe/921/487/383</a><br>
  <a href="https://www.facebook.com/profile.php?id=907087534832176" rel="nofollow">https://www.facebook.com/profile.php?id=907087534832176</a></p>
  
  <p>We want to be able to link to these pages from membership directories, participant reports, and so on, but the challenge for the membership manager is how to collect them efficiently.</p>
  
  <p>We encouraged with one group for people to add the URL of their LinkedIn or Facebook profile as a "website" field, but there was little or no uptake. Worse, we felt it disrupted the membership application process by sending someone not only offsite, but to a distracting social network where they might forget about their signup.</p>
  
  <p>Is there an extension or other mechanism whereby someone could click, on a profile, click on a button and have their profile ID for either service entered? Or on the flip side, is there any way for a profile to pull Facebook or LinkedIn information, so that data like name, email address, employer, and birthdate could be pre-populated during event or membership registration?</p>
  
  <p>There's some <a href="http://wiki.civicrm.org/confluence/display/CRM/Facebook+Integration" rel="nofollow">CodeCamp 2007 code</a> and <a href="http://wiki.civicrm.org/confluence/display/CRM/Social+CRM" rel="nofollow">Social CRM</a> ideas from 2011 on the wiki, but doesn't seem to be much that's been built.</p>
  
  <hr>
  
  <p>To clarify, the ultimate goal is to allow members to provide a link to their Facebook and LinkedIn profiles on a "member profile" page on a Drupal site, though a CMS-agnostic solution would naturally be preferable. It does not have to be the Fb shortcut; the unique user ID number is fine and even preferable; it just needs to be someone we can use to create a URL that a button can link to. </p>
  
  <p>Importing OAuth information from the CMS seems to be the way to go, though this complicates matters when trying to list people who do not want to use delegated authentication on the site.</p>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2015-05-20T16:04:05.567Z
Comments.Text: I've done some work for this type of solution using Drupal (as noted below).  Can you be more specific in how you want to resolve this?  Are you looking for suggested approaches or a complete solution? Most of this is handled by the CMS - which are you using?
Comments.UserDisplayName: Sonicthoughts
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2015-05-24T22:15:53.787Z
Comments.Text: NB: [Facebook Platform Policy: 3.5 Don’t proxy, request or collect Facebook usernames or passwords.](https://developers.facebook.com/policy/). Profile ID yes, but my reading of that says username alone no?
Comments.UserDisplayName: Chris Burgess
Tags: <custom-fields><social-media>
Title: Collecting Facebook, LinkedIn profiles
ThreadText: # Collecting Facebook, LinkedIn profiles
  
  (Asked by: username_0 on 2015-03-27)
  
  Collecting Twitter handles from users is straightforward: create a custom field, ask for the handle. But collecting links to Facebook or LinkedIn profiles is more tedious, since most people don't remember their shortlinks offhand, and probably even more people aren't even aware that they can choose a shortlink in the first place. Thus, their profiles have long, immemorable URLs like
  
  <http://us.linkedin.com/pub/john-doe/921/487/383>  
  <https://www.facebook.com/profile.php?id=907087534832176>
  
  We want to be able to link to these pages from membership directories, participant reports, and so on, but the challenge for the membership manager is how to collect them efficiently.
  
  We encouraged with one group for people to add the URL of their LinkedIn or Facebook profile as a "website" field, but there was little or no uptake. Worse, we felt it disrupted the membership application process by sending someone not only offsite, but to a distracting social network where they might forget about their signup.
  
  Is there an extension or other mechanism whereby someone could click, on a profile, click on a button and have their profile ID for either service entered? Or on the flip side, is there any way for a profile to pull Facebook or LinkedIn information, so that data like name, email address, employer, and birthdate could be pre-populated during event or membership registration?
  
  There's some [CodeCamp 2007 code](http://wiki.civicrm.org/confluence/display/CRM/Facebook+Integration) and [Social CRM](http://wiki.civicrm.org/confluence/display/CRM/Social+CRM) ideas from 2011 on the wiki, but doesn't seem to be much that's been built.
  
  ---
  
  To clarify, the ultimate goal is to allow members to provide a link to their Facebook and LinkedIn profiles on a "member profile" page on a Drupal site, though a CMS-agnostic solution would naturally be preferable. It does not have to be the Fb shortcut; the unique user ID number is fine and even preferable; it just needs to be someone we can use to create a URL that a button can link to.
  
  Importing OAuth information from the CMS seems to be the way to go, though this complicates matters when trying to list people who do not want to use delegated authentication on the site.
  
  **Tags:** custom-fields, social-media
  
  > **Comments:**
  > **username_1**: I've done some work for this type of solution using Drupal (as noted below).  Can you be more specific in how you want to resolve this?  Are you looking for suggested approaches or a complete solution? Most of this is handled by the CMS - which are you using?  
  > **username_2**: NB: [Facebook Platform Policy: 3.5 Don’t proxy, request or collect Facebook usernames or passwords.](https://developers.facebook.com/policy/). Profile ID yes, but my reading of that says username alone no?  
  
  ---
  
  ## 5 answers
  
  ### Answer by username_5 on 2015-03-31. Score: 10 | Accepted answer
  
  The <http://Attentive.ly> CiviCRM integration automatically returns the social media accounts that match with over a hundred social media sites including Twitter, LinkedIn, Facebook, Google+, Klout, etc., as well as social listening on relevant recent posts to Twitter and Facebook. It does a lot more to help improve your organization's online engagement with top influencers (meaning those that have a high Klout score). The service is not free, and works best for organizations that have at least 25,000 - 50,000 contacts. See <https://civicrm.org/extensions/attentively-integration>.
  
  > **Comments:**
  > **username_6**: Unfortunately this extension is no longer supported or maintained.  
  > **username_5**: Attentive.ly was bought by Blackbaud who shut down the API used by the extension, so we marked extension as no longer maintained.  
  
  ---
  
  ### Answer by username_3 on 2015-03-29. Score: 5
  
  Joomla contains a set of packages for connecting to social sites ([Facebook](https://github.com/joomla/joomla-cms/tree/staging/libraries/joomla/facebook), [LinkedIn](https://github.com/joomla/joomla-cms/tree/staging/libraries/joomla/linkedin), [Google](https://github.com/joomla/joomla-cms/tree/staging/libraries/joomla/google), [Twitter](https://github.com/joomla/joomla-cms/tree/staging/libraries/joomla/twitter), [Github](https://github.com/joomla/joomla-cms/tree/staging/libraries/joomla/github), there may be more). If you are using Joomla you can instantiate one of these to collect the link data as well as other data the user authorizes, just as you see a lot of places you make a button to submit the request to whatever api it is. They all follow the same pattern, once you do it once it should be easy to do additional ones.
  
  
  ---
  
  ### Answer by username_4 on 2015-03-27. Score: 4
  
  For FB, if the user entered the big ugly profile.php URL, you can get the shortlink (and profile pic) very easily using the Graph API, like this: http://graph.facebook.com/4?fields=link,picture. In our example, 4 is the user ID for Zuckerberg. If you have some JavaScript skills you could add a button to your contact template that allows the user to convert this. If not, your membership manager can just paste the URL into a browser location bar with the correct ID, press enter, and then copy-paste the short link and/or profile photo. You don't even need to be logged into FB to do this.
  Edit: After some more reading, the Graph API has deprecated the option to get the pretty username link for the logged in user. Every user now gets a unique id for every FB app. So that part kind of stinks and makes my lookup idea unreliable. To make up for it, here is a bit of JS to get you started with your FB button on the profile:
    window.fbAsyncInit = function() {
      FB.init({
        appId      : 'your app id here',
        xfbml      : true,
        version    : 'v2.3',
    status     : true
      });
    };
  
    (function(d, s, id){
       var js, fjs = d.getElementsByTagName(s)[0];
       if (d.getElementById(id)) {return;}
       js = d.createElement(s); js.id = id;
       js.src = "//connect.facebook.net/en_US/sdk.js";
       fjs.parentNode.insertBefore(js, fjs);
     }(document, 'script', 'facebook-jssdk'));
  
  
  CRM.$(function($) {
  
      FB.api('/me', {fields: 'first_name,last_name,address,birthday,email,picture{url},link'}, function(response) {
  
          console.log(response);
  
      });
  
  });
  
  > **Comments:**
  > **username_0**: Thanks. We wouldn't mind retrieving and storing the unique Facebook ID— arguably, it would be better. But simultaneously for people who *have* chosen a handle/shortlink, it's not easy to find, and whatever it is that we store, the ideal would be a one-click solution.  
  
  ---
  
  ### Answer by username_1 on 2015-04-06. Score: 3
  
  I would definitely agree with @username_3 - the cleanest solution is to request the user Oauth/login to the respective service. In drupal there are many modules to do this (e.g. [Drupal Oauth](https://www.drupal.org/project/oauth), [Oauth connector](https://www.drupal.org/project/oauthconnector), 3rd party services like [Janrain](https://www.drupal.org/project/rpx) or my favorite: [HybridAuth](https://www.drupal.org/project/hybridauth))
  
  Many provide Drupal rules integration or tokens which can even be added to civicrm (with the [civicrm\_entity](https://www.drupal.org/project/civicrm_entity) module for example.)
  
  The best part about getting the user to authenticate is you can access additional info like their user image, post to their wall, etc.
  
  I've used [Facebook Autopost](https://www.drupal.org/project/fb_autopost) for example, to post new events on behalf of users.
  
  
  ---
  
  ### Answer by username_5 on 2015-05-25. Score: 3
  
  There are two social media integration projects for this summer's Google Summer of Code. See <https://civicrm.org/blogs/achia/social-media-integration-civicrm-ii> (and posts on the <http://forum.civicrm.org/index.php/topic,36315.msg155084.html#msg155084> forum thread) and <http://forum.civicrm.org/index.php/topic,36059.0.html>. Although both have been accepted, I'm not sure how much activity has occurred on the latter project. Various students are starting their work at various times, but I think s0014 should be posting by now.
  
  I'd encourage working with the students and their mentors to try to ensure their work meets your needs. BTW, what are/were the criteria for awarding the bounty?
  
  > **Comments:**
  > **username_0**: I'm basically asking if there's a way to collect whichever identifier is necessary to create a link to someone's Facebook or LinkedIn profile. For instance, the fbid number would be fine e.g. *[4](https://www.facebook.com/profile.php?id=4)*, or the shortlink would be fine, e.g. *[zuck](https://www.facebook.com/zuck)*, whether it is populating a field by clicking on a link or copying it from OAuth credentials stored in the CMS, or by some other mechanism.  
  
  ---
  
  