Facebook data search and analysis

AleckNAleckN Member Posts: 4 Contributor I
edited November 2018 in Help

Greetings,

I have been trying to process Facebook data for analysis. Is there a way to pull (comments, likes, shares) from Facebook on Rapidminer like Twitter search operator?

 

Respectfully

Best Answer

  • curious95curious95 Member Posts: 12 Contributor II
    Solution Accepted

    @AleckN

    The current extension pulls only pages and the posts for a search term. The next build will have operators for pulling shares, likes, and comments for a particular post. It's under development and hopefully, it will be available in 2-3 days.

Answers

  • Thomas_OttThomas_Ott RapidMiner Certified Analyst, RapidMiner Certified Expert, Member Posts: 1,761 Unicorn
    You will have to use the Zapier operator to do that.
  • robinrobin Member Posts: 100 Guru

    Zapier? Is that on the marketplace? For some reason I do not see it, maybe just tierd. 

     

  • Thomas_OttThomas_Ott RapidMiner Certified Analyst, RapidMiner Certified Expert, Member Posts: 1,761 Unicorn

    I think the correct name for the operator is "Trigger Zapier" operator. It's located under the Data Access > Applications folder

  • Klaus_FRAKlaus_FRA Member Posts: 2 Contributor I

    Thomas, i use the find pages facebook operator and it brings back the page ids, but connecting it with find page content does not produce any results. Do you have a tip for me?

    Thanks Klaus

  • sgenzersgenzer Administrator, Moderator, Employee, RapidMiner Certified Analyst, Community Manager, Member, University Professor, PM Moderator Posts: 2,959 Community Manager

    hello @Klaus_FRA - welcome to the community.  The Facebook Extension was just published a week or so ago.  To be honest, I only started using it this morning and find it a little clunky.  Here's what I built to look for "rapidminer":

     

    <?xml version="1.0" encoding="UTF-8"?><process version="8.0.000">
    <context>
    <input/>
    <output/>
    <macros/>
    </context>
    <operator activated="true" class="process" compatibility="8.0.000" expanded="true" name="Process">
    <process expanded="true">
    <operator activated="true" class="facebook:MyOperator2" compatibility="1.0.000" expanded="true" height="68" name="Find Pages" width="90" x="179" y="34">
    <parameter key="FB Connection" value="Facebook"/>
    <parameter key="Query" value="rapidminer"/>
    </operator>
    <operator activated="true" class="loop_examples" compatibility="8.0.000" expanded="true" height="103" name="Loop Examples" width="90" x="313" y="34">
    <process expanded="true">
    <operator activated="true" class="extract_macro" compatibility="8.0.000" expanded="true" height="68" name="Extract Macro" width="90" x="45" y="34">
    <parameter key="macro" value="page"/>
    <parameter key="macro_type" value="data_value"/>
    <parameter key="attribute_name" value="Page ID"/>
    <parameter key="example_index" value="%{example}"/>
    <list key="additional_macros">
    <parameter key="name" value="Page Name"/>
    </list>
    </operator>
    <operator activated="true" class="generate_data_user_specification" compatibility="8.0.000" expanded="true" height="68" name="Generate Data by User Specification" width="90" x="246" y="34">
    <list key="attribute_values"/>
    <list key="set_additional_roles"/>
    </operator>
    <operator activated="true" class="facebook:fb_conn" compatibility="1.0.000" expanded="true" height="68" name="Find Page Content" width="90" x="380" y="34">
    <parameter key="Page ID" value="%{page}"/>
    <parameter key="FB Connection" value="Facebook"/>
    </operator>
    <operator activated="true" class="generate_attributes" compatibility="8.0.000" expanded="true" height="82" name="Generate Attributes" width="90" x="514" y="34">
    <list key="function_descriptions">
    <parameter key="Page Name" value="%{name}"/>
    <parameter key="Page ID" value="%{page}"/>
    </list>
    </operator>
    <connect from_port="example set" to_op="Extract Macro" to_port="example set"/>
    <connect from_op="Generate Data by User Specification" from_port="output" to_op="Find Page Content" to_port="example set"/>
    <connect from_op="Find Page Content" from_port="example set" to_op="Generate Attributes" to_port="example set input"/>
    <connect from_op="Generate Attributes" from_port="example set output" to_port="output 1"/>
    <portSpacing port="source_example set" spacing="0"/>
    <portSpacing port="sink_example set" spacing="0"/>
    <portSpacing port="sink_output 1" spacing="0"/>
    <portSpacing port="sink_output 2" spacing="0"/>
    </process>
    </operator>
    <operator activated="true" class="append" compatibility="8.0.000" expanded="true" height="82" name="Append" width="90" x="447" y="85"/>
    <operator activated="true" class="set_role" compatibility="8.0.000" expanded="true" height="82" name="Set Role" width="90" x="581" y="85">
    <parameter key="attribute_name" value="Page ID"/>
    <parameter key="target_role" value="id"/>
    <list key="set_additional_roles"/>
    </operator>
    <connect from_op="Find Pages" from_port="example set" to_op="Loop Examples" to_port="example set"/>
    <connect from_op="Loop Examples" from_port="output 1" to_op="Append" to_port="example set 1"/>
    <connect from_op="Append" from_port="merged set" to_op="Set Role" to_port="example set input"/>
    <connect from_op="Set Role" from_port="example set output" to_port="result 1"/>
    <portSpacing port="source_input 1" spacing="0"/>
    <portSpacing port="sink_result 1" spacing="0"/>
    <portSpacing port="sink_result 2" spacing="0"/>
    </process>
    </operator>
    </process>

    Scott

     

  • curious95curious95 Member Posts: 12 Contributor II

    @sgenzer @Klaus_FRA we are working on the extension to fix the existing issue and add more features. Hopefully, a new build will be coming tomorrow.

  • curious95curious95 Member Posts: 12 Contributor II

    Here is a sample process file where you can fetch all the posts with a particular term from various pages. Please create a new facebook connection before running it.

     

    <?xml version="1.0" encoding="UTF-8"?><process version="7.6.001">
    <context>
    <input/>
    <output/>
    <macros/>
    </context>
    <operator activated="true" class="process" compatibility="7.6.001" expanded="true" name="Process">
    <parameter key="logverbosity" value="init"/>
    <parameter key="random_seed" value="2001"/>
    <parameter key="send_mail" value="never"/>
    <parameter key="notification_email" value="kamal.flyhigh@gmail.com"/>
    <parameter key="process_duration_for_mail" value="30"/>
    <parameter key="encoding" value="SYSTEM"/>
    <process expanded="true">
    <operator activated="true" class="facebook:FindPages" compatibility="1.0.001" expanded="true" height="68" name="Find Pages" width="90" x="112" y="136">
    <parameter key="FB Connection" value="NewConnection"/>
    <parameter key="Query" value="salman khan"/>
    </operator>
    <operator activated="true" class="concurrency:loop_values" compatibility="7.6.001" expanded="true" height="82" name="Loop Values" width="90" x="313" y="34">
    <parameter key="attribute" value="Page ID"/>
    <parameter key="iteration_macro" value="loop_value"/>
    <parameter key="reuse_results" value="false"/>
    <parameter key="enable_parallel_execution" value="true"/>
    <process expanded="true">
    <operator activated="true" class="facebook:FindPageContent" compatibility="1.0.001" expanded="true" height="68" name="Find Page Content" width="90" x="246" y="85">
    <parameter key="Page ID" value="%{loop_value}"/>
    <parameter key="FB Connection" value="NewConnection"/>
    </operator>
    <connect from_port="input 1" to_op="Find Page Content" to_port="example set"/>
    <connect from_op="Find Page Content" from_port="example set" to_port="output 1"/>
    <portSpacing port="source_input 1" spacing="0"/>
    <portSpacing port="source_input 2" spacing="0"/>
    <portSpacing port="sink_output 1" spacing="0"/>
    <portSpacing port="sink_output 2" spacing="0"/>
    </process>
    </operator>
    <operator activated="true" class="append" compatibility="7.6.001" expanded="true" height="82" name="Append" width="90" x="514" y="34">
    <parameter key="datamanagement" value="double_array"/>
    <parameter key="data_management" value="auto"/>
    <parameter key="merge_type" value="all"/>
    </operator>
    <connect from_op="Find Pages" from_port="example set" to_op="Loop Values" to_port="input 1"/>
    <connect from_op="Loop Values" from_port="output 1" to_op="Append" to_port="example set 1"/>
    <connect from_op="Append" from_port="merged set" to_port="result 1"/>
    <portSpacing port="source_input 1" spacing="0"/>
    <portSpacing port="sink_result 1" spacing="0"/>
    <portSpacing port="sink_result 2" spacing="0"/>
    </process>
    </operator>
    </process>
  • sgenzersgenzer Administrator, Moderator, Employee, RapidMiner Certified Analyst, Community Manager, Member, University Professor, PM Moderator Posts: 2,959 Community Manager

    this is GREAT.  Thank you @curious95!  Perhaps you can write a knowledgebase article for us so other users can find this information easily?

     

    EDIT: just curious about the authentication.  When I used this yesterday, the extension went through an OAuth process with Facebook (similar to our Twitter extension) which made sense to me.  This morning when I updated to your new version, it goes instead to Aptus' Azure acct.  What's the process here?

     

    Screen Shot 2017-12-05 at 9.35.48 AM.png 

     

    Also you may want to update the "About" section:

     

    Screen Shot 2017-12-05 at 9.39.32 AM.png

     

    Again thank you for producing such a great idea.

     

    Scott

     

     

  • AleckNAleckN Member Posts: 4 Contributor I

    This is good news indeed. This was a very necessary to RapidMiner. Looking forward to try the new build.

    Thank you @curious95

  • Klaus_FRAKlaus_FRA Member Posts: 2 Contributor I

    @curious95 @sgenzer thank you both for this fast and helpful answer. Now i can search facebook for a given term. 

  • snizam48snizam48 Member Posts: 2 Contributor I

    Hi

    The FB Oauth seems like not working anymore. It is pointing to a non-functioning IP address. Anybody know how to fix this? This is from the URL copied from OAuth for FB

    Screen Shot 2018-01-21 at 10.56.12 AM.png

  • curious95curious95 Member Posts: 12 Contributor II

    @snizam48 The oAuth credential page is under maintenance. It will be available soon.

  • curious95curious95 Member Posts: 12 Contributor II

    @snizam48 @sgenzer The extension is up and running now.

  • snizam48snizam48 Member Posts: 2 Contributor I

    Hi @curious95 . Tried the FB OAuth again today, but by copying the url and accessing it thru chrome, I still get the same result as below:Screen Shot 2018-01-25 at 3.22.50 PM.pngScreen Shot 2018-01-25 at 3.22.13 PM.png 

  • vomervomer Member Posts: 2 Contributor I

    Hi RM Community,

     

    I was trying to create a facebook connection today but it gave the following message - 

     

    Facebook has detected RapidMiner isn't using a secure connection to transfer information.
    Until RapidMiner updates its security settings, you won't be able to use Facebook to log into it.
     
    Any idea, why this message?
     
    Thanks!
  • vomervomer Member Posts: 2 Contributor I

    I was able to fix this by changing http to https in authorization URL.

  • yy7777yy7777 Member Posts: 10 Contributor I
    Hi vomer I got the same problem trying to request an access token. Could you provide some further details how you fixed it? This was really my first try for facebook analysis. Thanks!
Sign In or Register to comment.