Support Questions

Find answers, ask questions, and share your expertise
Announcements
Check out our newest addition to the community, the Cloudera Data Analytics (CDA) group hub.

Apache Nifi - facebook integration

Rising Star

I want to run a use case to capture personal details (status & location) from Facebook using Apache NiFi. Please advice how to capture that information using which processor and example of attributes. Also if we need to capture change in notification of such details - how do we track it.

1 ACCEPTED SOLUTION

Ingesting data from Facebook using NiFi before has been asked before. I'd suggest you start there: https://community.hortonworks.com/questions/43184/how-to-get-facebook-feeds-into-nifi.html

As for detecting change, that is a whole other question/problem. It would require information about where you're eventually putting the Facebook data, how much data you're track, etc. in order to know how to query it to determine if it changed. I'd suggesting asking another question with those details (and any more you can share).

View solution in original post

13 REPLIES 13

Ingesting data from Facebook using NiFi before has been asked before. I'd suggest you start there: https://community.hortonworks.com/questions/43184/how-to-get-facebook-feeds-into-nifi.html

As for detecting change, that is a whole other question/problem. It would require information about where you're eventually putting the Facebook data, how much data you're track, etc. in order to know how to query it to determine if it changed. I'd suggesting asking another question with those details (and any more you can share).

Super Guru

The one thing I didn't do in the article Milind posted was the paging aspect. That can be done it just takes a few extra steps and processors to step through to get potentially more.

If you are running this constantly you will not need it.

Explorer

Hi @Timothy Spann

could you please share some details regarding how to handle paging aspect through NiFi? Like which processors to use and how to modify the query to get more next page feeds and in a particular feed how to get all the comments.

Thanks.

Omer

New Contributor

Hi @omer alvi, did you find any solution to the paging problem? I am also facing the same issue.

Thanks.

Rishabh

New Contributor

Expressing facebook API logic with standard processors may be tough and dirty. You could consider custom processors as we had to write for our usecase: https://datamater.io/2018/05/07/nifi-get-facebook-processor/

Yes, they solve paging problem 😉

Rising Star

@Timothy Spann, @jpercivall, @milind pandit - Thanks for your suggestions and support.

I am able to access the data on above shared URL<facebookID> but I am unable to view data on my own account. Please advice if there is any settings to enable to fetch more data. I did tick box on fields likes user_friends, user_status, user_likes while user token generation. Both submission I only see my id and name in data and while configured in getHTTP processor I see no data.

0x00000000 7D{"data":[]}

above shared User id data comes through like

0x00000000 7B2264617461223A5B7B226D65737361{"data":[{"messa 0x000000106765223A224F75722064657369676E20ge":"Our design 0x00000020666F7220486F72746F6E776F726B7327for Hortonworks'0x00000030206E65772042756461706573742C206F

new Budapest, o

Please advice.

Super Guru

1. Make sure you have the SSLcontext created.

2. it is either encrypted or uuencoded. try to decode with UUDecoder in nifi

Rising Star

SSL Context is fine as I am able to fetch data for a different user. I notice that in Graph API explorer when I input another user I able to see additional information apart from name and id while using '/tagged' in front of ID but it shows no data for my facebook ID. I guess I am missing some settings in facebook app to enable security to provide my personal information to application. Please advice.

Rising Star

Hi. Any suggestions on this issue. I am waiting to march forward on this use-case

Super Guru

Facebook only let's you see information that you are allowed to see.

You have set your Facebook security settings and your app settings.

You also will only have access to information that users want you to see.

Work it out in the Facebook graph explorer first and then use that API call.

That may be unicode.

http://stackoverflow.com/questions/3806215/facebook-graph-api-non-english-album-names

Are you using an American English ID or another language that may be stored in unicode due to other characters not in UTF-8?

Characters like these will be unicode encoded in JSON: பதவியேற்ற

Explorer

Hi Timothy,

- I'm facing with this error: "ssl context service invalid because sslcontextservice is disable".

Can you help me ?

Thanks in advance,

11290-nifi-facebook-error.jpg

New Contributor
Take a Tour of the Community
Don't have an account?
Your experience may be limited. Sign in to explore more.