• Topic
  • Discussion
  • VOS.VirtSpongerCartridgeFacebook(Last) -- Owiki? , 2018-04-13 12:08:16 Edit owiki 2018-04-13 12:08:16

    Virtuoso Sponger Cartridge for Facebook

    Create Facebook API Key and Session:

    1. Create an account at http://facebook.com
    2. Go to link "Applications"
    3. Click the link "developers".
    4. Go to http://www.facebook.com/developers/editapp.php?new
    5. Click "Get Started" link.
    6. Click the link "Add Facebook Developer Application"
    7. Click the button "Set up New Application"
    8. Enter name in the field "Application Name"
    9. Check the shown check-box.
    10. Click the "Optional fields" link.
    11. Enter in "Callback Url" field the url to your ods location, i.e.

      http://host:port/ods/

    12. Fill in the "Canvas Page URL" field, for example:

      http://apps.facebook.com/myods/

    13. Select the radio-box "Use iframe".
    14. For "Can your application be added on Facebook?" choose the "Yes" radio-box.
    15. For the field "Post-Add URL" enter your canvas url from above, for example:

      http://apps.facebook.com/myods/

    16. For the field "Side Nav URL" enter your canvas url from above, for example:

      http://apps.facebook.com/myods/

    17. Click Submit
    18. As result your API key and session will be created and shown under the name of the created application.

    Facebook integration in Conductor:

    1. Upgrade to the latest conductor_dav.vad, ods_framework_dav.vad and cartridges_dav.vad packages.
    2. Go from Conductor to tab RDF->Linked Data->Sponger->Extractor Cartridges
    3. As result in the Cartridges list should be shown a mapper with description "Facebook" and pattern " http://www.facebook.com/.*"
    4. Click its "Edit" link.
    5. Click the link "Get FB Session".
    6. Now enter the API key you have created from above for your FB application.
    7. Click the "Get token" button.
    8. Click the link "get login code for [the name of your app]"
    9. As result should be shown the page with title "Save My Login Info". Click the "Generate" button.
    10. As result should be shown the one-time code.
    11. In the form bellow the page enter in the "Authentication Token" the code from step 10. and enter the secret value you have generated from above.
    12. Click the "Generate session" button.
    13. As result this message should be shown:

      "FB permanent session generation Your permanent FB session key is: .... Copy an paste the shown code in the FB Linked Data 'session' option, then can close this window."

    14. Now in the still opened page from Conductor in the Options text-area enter the session=[the session key from above] and for secret=[enter the generated one form above]
    15. Enter for API Key the generated one from above.
    16. Click the button "Update".

    Facebook integration in ODS:

    Note: If no ODS user Profile Edit Page is set with FB key, secret and session, then by default the values are taken from Conductor, if entered.

    1. Login at ODS
    2. Go to user's Edit Profile Page
    3. Go to tab "Associations& Web Services"
    4. Fill in the values in the "Facebook Session" text-area respectively for key, secret with the generated ones from above.
    5. If you do not have the session value, click the "Get FB session" button and:
      1. As result will open a new pop-up page. Enter the API key for your FB application.
      2. Click the "Get token" button.
      3. Click the link "get login code for [the name of your app]"
      4. As result should be shown the page with title "Save My Login Info". Click the "Generate" button.
      5. As result should be shown the one-time code.
      6. In the form bellow the page enter in the "Authentication Token" the code from step 10. and enter the secret value you have generated from above.
      7. Click the "Generate session" button.
      8. As result this message should be shown:

        "FB permanent session generation Your permanent FB session key is: .... Copy an paste the shown code in the FB Linked Data 'session' option, then can close this window."

      9. Copy the generated session value and close the page.
    6. Paste the generated session value in the "session=" area.
    7. Click Save.

    Viewing your ODS as application of Facebook:

    1. Go to the url you have entered from above for your application, for example:

      http://apps.facebook.com/myods/

    2. In the shown frame with ODS click sign in and login with an account you have at your ODS location.
    3. As result you should be logged in successfully.

    Injecting Facebook data into ODS:

    1. In your Facebook account area create an album with several images uploaded.
    2. Share the album to your friend(s).
    3. Create several events.
    4. Go to Facebook Profile page.
    5. At the bottom click the "Create a Profile Badge" link.
    6. Click the button "Create Badge".
    7. Click the button "Save".
    8. As result at the bottom of the page will be shown your profile public link, for example:

      Put a link to your Facebook profile on AIM: <a href=http://www.facebook.com/p/Lio_Lao/646053997>Facebook me!</a>

    9. Copy this URL: http://www.facebook.com/p/[your name]/[fid]
    10. Now go to http://host:port/sparql (you can also use the RDF Browser, isparql or the isql tool).
    11. Enter as default Graph URL the url from the previous step.
    12. Execute the query:

      SELECT DISTINCT ?Concept FROM <http://www.facebook.com/p/[your name]/[fid]> WHERE { [] rdf:type ?Concept . }

      Note: if you have entered the FB key, session and secret for an ODS User and you want to view his FB Graph data, you need to add the login name in front of the query, i.e.:

      define get:login "test1" SELECT DISTINCT ?Concept FROM <http://www.facebook.com/p/Lio_Lao/646053997> WHERE { [] rdf:type ?Concept . }

      CategoryVirtuoso CategorySponger? CategorySpec CategoryDocumentation CategoryFacebook? CategoryODS CategoryRDF