Social Media Integration with CiviCRM II

Publicado
2015-05-20 08:17
Written by

I am Aka Rolence Achia, a sophomore undergraduate student enrolled for a degree of Bachelor in Computer Engineering at the university of Buea. I have been a member in CiviCRM for about 2 months now and will be participating in GSoC 2015 as a student developer working on the project Social Media Interation with CiviCRM.

This project involves integrating data from social media with contact information on CiviCRM to increase the effectiveness of the way an organization manages its constituent relationships. Since CiviCRM aims at sustaining relationships with supporters over time, the social media integration project will help the organization to use CiviCRM to sustain supporter’s relationships. I will be concentrating on adding social media account information to contact records, finding ways of showing level of engagement for individual contacts and I also plan to investigate generating automatic tweets/posts based on contact activity.

 Requirements and scope

·         Pull in contacts from social media & match to CiviCRM contacts based on available information,

·         Import into CiviCRM data about who is re-tweeting, sharing, writing on your wall,

·         Establish ways to determine highly active users based on their social media activity,

·         Add ability to automatically publish/tweet about events, certain types of activities, possibly progress towards fundraising goals.

In terms of scoping the project, we have these big questions:

·         It has been decided that we work with Twitter and Facebook as our primary focus of social media integration with CiviCRM, what information are we interested in getting from social media platforms into CiviCRM?

·          What are we going to be doing with this information on the Civi Platform?

 

Key deliverables

 

At the end of this project, we want to produce a CiviCRM extension with Facebook and twitter that performs the following;

·         We should be able to get tweets and Facebook posts of a particular contact in Civi, match it to the contact and display it

·         Getting the contact activity from social media into the Civi platform and displaying it against the contact in the Civi platform

·         The possibility of automatic tweets or Facebook posts for example automatically thanking someone

The scoping of the project is still going on. Most of the work done in the scoping at the moment is deciding what information to get from the social  media platforms selected, how to manage it (what to do with it), what information can be sent to the social platforms and how this information will be managed there.

Community Participation

Contributions from the community at this point will be very helpful so we can consolidate on all the information that we want to get about a Civi contact from social media and what can we send about a Civi Contact from the Civi platform to the social media platforms (Facebook and Twitter).

I have also started a forum thread on this part of the project here. Comments on this blog post will be helpful.

 

Filed under

Comments

We have been having discussions on the scope of the project and this part of the project has been streamlined as follows

 

Information to be gotten from Facebook

Match the Civi contact with the Facebook account 

 Check if the user likes the organization on Facebook

 Check if the user is writing on the organization wall and what they are writing

 Check if a user is liking or commenting on the organization’s post and their comments

 Get the number of friends for that organization on Facebook

Information to send to Facebook

 Post to a user’s wall automatically. 

Information to be gotten from twitter

 Matching a user’s profile to its CiviCRM contact

 Check if a user is following the organization on twitter

 Check if a user is tweeting at the organization and possibly get the tweets

 Check if a user is sending direct messages to an organization on twitter and possibly getting the messages

 Check if a user is retweeting at the organization

 Get the number of followers the organization has on twitter

Information to be sent to twitter

 Automatic tweets to user about an event or fund raising goal or status

 

Other information to display at the Civi end

 The total number of followers or friends of the organization

 Highly active users

Project State

We started this project off by scoping the project from the initial GSoC proposal submitted and came out with the manageble scope above. According this scope, the whole of this part of the project depends on what information that we can get from Facebook and Twitter so we can use any as a matching criteria for the civi friends to the civi contact.

We started off with Facebook looking at the API and the Facebook SDK v4 for php, more practically the Graph API and a lot has change from version 1 to version two of the Graph API in terms of permissions allowed to get data about a user's friends from facebook

The idea we were trying to implement was to get the emails of a user's friend (CiviCRM user)via the graph API and match with the emails of the civi contact table because we believe the email is unique and we may have a match keeping in mind the case that a friend of Civi may not use the same email for facebook and in CiviCRM.

Now according to the new developments on the API and Privacy policies in the Facebook platform, For us to get information about any CiviCRM friend such as the primary email, our app must request the user's permission and it is granted the permission before it can get that information. Also based on the friend's privacy settings, Facebook will allow you to get available data.

The only information that can be gotten by our extension (the app) that does not require the friends' permission is the user_id, name, and picture via the /me/taggable_friends(https://developers.facebook.com/docs/graph-api/reference/v2.0/user/taggable_friends) endpoint, and only can be used after a review of your app by Facebook.

With user permissions, we can get the following; public_profile, email, and the user _friends

Question: what will be the experience or interaction flow of the extension if we have to request the permission of a user before get his information that we can use to match his contact to his profile to the civi contact?

What we are doing now

we have written the srcipt that uses the API and the SDK to get friends ID, name, picture as per /me/taggable_friends(https://developers.facebook.com/docs/graph-api/reference/v2.0/user/taggable_friends) endpoint, and will submit for Facebook review today, so we can use it to get those information though we do not know how helpfull it will be in matching while awaiting suggestions from the community.

Our next step which will start by the end of today will be to request the user's permission to get their emails so we hope to get feedback from the community today so we could move forward.

suggestions will be helpful 

 

 

 

 

 

Hi there community, this post gives some brief update on the project so far

We have approximately 4 weeks to the end of the programme and this is where we are so far

1) Social Media integration with Twitter

We have succeeded in getting some information from twitter about the followers of a Civicrm organization without the followers' permission ie these information are available through the twitter API. We did not succeed to get email address from Twitter. We are using the "name" field to do the matching of follower to a civi contact and because we are using name which is not unique, we cannot do the matching automatically. For the moment we have resolved to doing the matching manually till a better method comes up. To do the matching, an admin working on the extension will click a button to pull followers information from Twitter via the API, to do matching he will click a button to do it, two forms will come up one containing contacts fromt he Civi contact table and one containg contacts from the CiviSocial follower's table. Each contact will appear with a check box, an admin will tick a checkbox on one form and tick on the other form to match those two contacts, those two will be added to a table below as matched. An admin does the matching after verifying that the two contacts match to avoid mismatching.

At the end of this week we should have a demo available for testing.

2) Social Media integration with Facebook

We have resolved in demanding the permission of a friend to an organization's information such as email, name which we can use in matching. We have done the permission request part and we will be working on Facebook nextweek to do matching. 

By the end of next week, a demo should be available for this.