Exemple #1
0
def facebook_auth():
    F.AUTH_SCOPE = [
        'publish_stream', 'read_stream', 'user_status', 'offline_access'
    ]
    short_token = F.authenticate()
    params = {
        'client_id': F.APP_ID,
        'grant_type': 'fb_exchange_token',
        'fb_exchange_token': short_token
    }
    return F.graph_post('/oauth/access_token', params)
Exemple #2
0
def facebook_post_feed(post, access_token):
    F.ACCESS_TOKEN = access_token
    F.graph_post('/me/feed', {'message': post})
Exemple #3
0
def facebook_comment_post(post_id, comment, access_token):
    post_url = '/' + post_id + '/comments/'
    params = {'access_token': access_token, 'message': comment}
    F.graph_post(post_url, params)
Exemple #4
0
def facebook_like_post(post_id, access_token):
    post_url = '/' + post_id + '/likes/'
    params = {'access_token': access_token}
    F.graph_post(post_url, params)
Exemple #5
0
def facebook_comment_post(post_id, comment, access_token):
  post_url = '/' + post_id + '/comments/'
  params = {'access_token' : access_token, 'message' : comment}
  F.graph_post(post_url, params)
Exemple #6
0
def facebook_post_feed(post, access_token):
  F.ACCESS_TOKEN = access_token
  F.graph_post('/me/feed', {'message': post})
Exemple #7
0
def facebook_like_post(post_id, access_token):
  post_url = '/' + post_id + '/likes/'
  params = {'access_token' : access_token}
  F.graph_post(post_url, params)
Exemple #8
0
def facebook_auth():
  F.AUTH_SCOPE = ['publish_stream', 'read_stream', 'user_status', 'offline_access']
  short_token = F.authenticate()
  params = {'client_id' : F.APP_ID, 'grant_type' : 'fb_exchange_token', 'fb_exchange_token' : short_token}
  return F.graph_post('/oauth/access_token', params)