node-red-web-nodes icon indicating copy to clipboard operation
node-red-web-nodes copied to clipboard

Facebook Node

Open hindessm opened this issue 10 years ago • 0 comments

Input Node

  • New status (posted by you or one in which you are tagged)
  • New photo (posted by you or one in which you are tagged)
  • New link
  • Profile change

Query

  • Fetch photo
  • Fetch album contents

Outputs

  • Upload photo to an album
    • node options
      • album
      • localFilename - local filename containing the content to be uploaded
    • msg options
      • localFilename - local filename containing the content to be uploaded
      • payload - the content to be uploaded (localFilename takes priority)
      • delete - if set, the remote file will be deleted from the album
      • photo_id - used to identify the photo to be deleted

Authentication

Users must register their own app at https://developers.facebook.com/ and paste the required tokens into the node. The user must then do the oauth in the browser to get a short-term access token. This can be exchanged for a long-term (60-day) access token. The long-term token must be refreshed but the user is expected to be available to confirm if required. Status messages can only be posted using short-term access tokens.

Notes

Test users may be created see https://developers.facebook.com/docs/graph-api/reference/v2.1/test-user Access tokens are described at https://developers.facebook.com/docs/facebook-login/access-tokens There are two main candidates for node wrappers for the API:

  • https://github.com/Thuzi/facebook-node-sdk
  • https://github.com/criso/fbgraph

hindessm avatar Sep 11 '14 08:09 hindessm