Integrating Facebook with CRM

895 views Asked by At

I am looking at integrating our existing CRM with Facebook. I have spent a lot of time with some existing tutorials and a lot of stuff out there is now obsolete as FB api has changed a lot over the years. A lot of privacy regulations have been enforced since it first came out. I have been struggling with the api graph explorer and i feel it behaves quite strange. The api doc also seems a bit confusing to me.

My requirement is:

  1. When I create a contact/lead in the CRM, query FB API with either name/email/phone (which ever is allowed) for their facebook profile/userId (well only if the user have a public profile).

  2. Once a contact/lead has a facebook profile/userId associated with it (manually entered or auto linked as above), display the facebook user's feed within the CRM.

  3. Search Facebook globally for mentions of certain keywords or hashtags (this I think twitter allows) and add facebook users as leads.

Services like fullcontact seem to give a lot of info when searched by email but it doesnt work most of the times.

I have created an APP Id on facebook. Will this APP Id itself be enough for my web application to query the graph api and get all the above data? Or will i have to ask for my users for authentication/permissions of their facebook profile? Or is the above not possible at all?

I have gone through the documentation here: https://developers.facebook.com/docs/graph-api/using-graph-api/v2.3#search and it does say you can search for a user, but can I not do this using the app access token? what can I do using the app access token?

Using my app access token i'm just not able to fetch any data/search the api. Get errors like:

https://graph.facebook.com/v2.3/zuck

{
  "error": {
    "message": (#803) Cannot query users by their username (zuck),
    "type": OAuthException,
    "code": 803
  }
}

https://graph.facebook.com/v2.3/search?q=zuck&type=user

{
    "error": {
      "message": A user access token is required to request this resource.,
      "type": OAuthException,
      "code": 102
    }
}

If I have to get a user's access token to do this, then what permissions should I request from the user for the above api access that I require?

I understand only public content is accessible over the API and that is fine.

1

There are 1 answers

5
CBroe On BEST ANSWER

When I create a contact/lead in the CRM, query FB API with either name/email/phone (which ever is allowed) for their facebook profile/userId (well only if the user have a public profile).

You can only search for users by name, and only if they allow their name to be searched.

Searching via email or phone number ist not possible.

Once a contact/lead has a facebook profile/userId associated with it (manually entered or auto linked as above), display the facebook user's feed within the CRM.

Not possible.

read_stream permission will not be granted to your app in review.

The most you can get are the user’s own posts, using user_posts permissions. For that, users will have to login to your app and grant it the permission first.

Search Facebook globally for mentions of certain keywords or hashtags (this I think twitter allows)

Not possible any more either. Public post search has been removed with API v2.

If I have to get a user's access token to do this, then what permissions should I request from the user for the above api access that I require?

Searching doesn’t require any extended permissions. You just need to have the user (any user) login to your app.