Skip to content

Instantly share code, notes, and snippets.

@ekoneil
Created December 1, 2011 19:42
Show Gist options
  • Save ekoneil/1419286 to your computer and use it in GitHub Desktop.
Save ekoneil/1419286 to your computer and use it in GitHub Desktop.
Configuring privacy for stories published to Facebook
#!/bin/bash
# Works for stream.publish and open graph actions
# Only Me privacy
# -F "privacy={'value':'SELF'}" \
# Subset of friends privacy
# -F "privacy={'value':'CUSTOM', 'friends':'SOME_FRIENDS', 'allow': 'uid-1,uid-2'}" \
# Friend lists
# -F "privacy={'value':'CUSTOM', 'friends':'SOME_FRIENDS', 'allow': 'friend-list-1,friend-list-2'}" \
# Docs
# https://developers.facebook.com/docs/reference/rest/stream.publish/
# Example:
curl -F "message=Stream story created via stream.publish" \
-F "privacy={'value':'CUSTOM', 'friends':'SOME_FRIENDS', 'allow': 'friend-list-1,friend-list-2'}" \
-F "access_token=$T" \
https://graph.facebook.com/me/feed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment