Skip to content

Instantly share code, notes, and snippets.

@cnsoft
Last active December 18, 2015 08:29
Show Gist options
  • Save cnsoft/5754608 to your computer and use it in GitHub Desktop.
Save cnsoft/5754608 to your computer and use it in GitHub Desktop.
Facebook Concept.
http://www.simplewebtoolbox.com/whats-the-difference-between-facebook-account-and-pages/
Personal Profile: When you create a Facebook personal account, this is your individual account. You put your photo, your life history, all the things that are about you. It is against the Facebook terms of service to create a personal account with a business name. If you have done this, change the name on your account to a name. If they catch you with a business name instead of a personal name, they will shut the account down.
Friend Requests: With a Facebook Account, you can connect to people by becoming friends. They send a friend request, you accept, or vice versa.
Privacy Settings: With a Facebook account you can set privacy settings so only your friends on Facebook can see your information. You can also set it so some or all of your information is seen by non-friends. It’s your choice. The one thing that you cannot set to private is your profile photo. Also, the fact that you have a Facebook account will be available to anybody who searches for you.
Newsfeed: Your newsfeed page shows posts from everybody that you are friends with as well as pages you have liked. It will also show posts from groups if you have it set to show. By default groups do not show up on your newsfeed. Your newsfeed or ordered with newest posts first.
Wall: Your all shows all the posts you have made, whether as a status update, on a page or some other person’s wall. It will show posts to groups if the group is public. If the group is private, no mention of your posts show up on your wall.
Admins: There are no admins on your personal Facebook account. Somebody else has to have your login to edit your account.
Customization: While you can put up photos or videos, you cannot add functionality to your personal account.
@cnsoft
Copy link
Author

cnsoft commented Jun 11, 2013

!/usr/bin/python

coding: utf-8

import facebook
import urllib
import urlparse

access_token_page='X'
FACEBOOK_APP_ID = 'Y'
FACEBOOK_APP_SECRET = 'Z'
FACEBOOK_PROFILE_ID = 'W'

oauth_args = dict(client_id = FACEBOOK_APP_ID,
client_secret = FACEBOOK_APP_SECRET,
grant_type = 'client_credentials')

oauth_response = urllib.urlopen('https://graph.facebook.com/oauth/access_token?' + urllib.urlencode(oauth_args)).read()

attach = {
"name": 'Hello world',
"link": 'http://www.example.com',
"caption": 'test post',
"description": 'some test',
"picture" : 'http://www.example.com/picture.jpg',
}

facebook_graph = facebook.GraphAPI(access_token_page)
try:
response = facebook_graph.put_wall_post('', attachment=attach)
except facebook.GraphAPIError as e:
print e

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment