Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

How to get facebook feeds into NiFi?

Solved Go to solution

How to get facebook feeds into NiFi?

New Contributor

How to get facebook data and store into my HDFS

  • Ex. I have one #tag say Starbucks i need to get feeds from it as json file
  • I'm newer in NIFI so please explain from beginning and read many posts regarding facebook need to start from getHttp
  • which address i need to give to get feeds for particular tags.
  • please show me properties with example

Thanks in advance

1 ACCEPTED SOLUTION

Accepted Solutions

Re: How to get facebook feeds into NiFi?

Super Guru
7 REPLIES 7

Re: How to get facebook feeds into NiFi?

New Contributor

Thanks @Pierre Villard

I got some data but still having doubts

  • I have created one app in facebook developer and using graph API explorer get my access token
  • In my Gethttp, I use url as https://graph.facebook.com/v2.6/Starbucks&access_token=my_access_token
  • i have to give at least a name of the file and i configure ssl (StandardSSLContextService)
  • Finally i directly put into HDFS, after receive first file it shows error file already exist

My problem is how can i received as multiple json files and my access token is expired in specific time is thr any options to extend dynamically....please show me with properties screen shot

Thank you...

Re: How to get facebook feeds into NiFi?

Hi @Manikandan Durairaj

To update the name of the file, you can use an UpdateAttribute processor and set the attribute 'filename' with the name of your choice using expression language [1]. If you want a name based on current time, you can use date functions, otherwise you can use the function UUID to generate a unique filename for each flow file.

That would be a property filename with ${UUID()}

[1] https://nifi.apache.org/docs/nifi-docs/html/expression-language-guide.html

Hope this helps.

Re: How to get facebook feeds into NiFi?

Guru

This post is similar to your use case and shows how to rename the file for repeated ingests as @Pierre Villard describes

https://community.hortonworks.com/articles/48816/nifi-to-ingest-and-transform-rss-feeds-to-hdfs-usi....

Re: How to get facebook feeds into NiFi?

New Contributor

Hi @Manikandan Durairaj,

Can you share template with me if you get success on this.

Regards,

Yogesh

Re: How to get facebook feeds into NiFi?

New Contributor

Did you ever run into problems in terms of API permission? I am trying to do something similar, searching for a specific word in public posts and fetch them using NiFi and pushing it to HDFS but I am having trouble doing so.

Could you share a template with me if you get any further in this process?

Thanks

Re: How to get facebook feeds into NiFi?

Super Guru