Exemple #1
0
def create_fbuser(user, fbid, access_token):
    fbuser = FacebookUser()        
    fbuser.user = user
    fbuser.facebook_id = fbid
    fbuser.last_name = lname
    fbuser.access_token = access_token

    fbuser.save()
    return fbuser
Exemple #2
0
def create_fbuser(user, uid, token, name=None):
    fb_user = FacebookUser()
    fb_user.user = user
    fb_user.access_token = token
    fb_user.facebook_id = uid
    fb_user.name = name
    fb_user.queue_for_pull = True
    fb_user.save()
    return fb_user
Exemple #3
0
def create_fbuser(user, uid, token, name=None):
    fb_user = FacebookUser()
    fb_user.user = user
    fb_user.access_token = token
    fb_user.facebook_id = uid
    fb_user.name = name
    fb_user.queue_for_pull = True
    fb_user.save()
    return fb_user
Exemple #4
0
def create_fbuser(user, fb):

    fbid = fb["fbid"]
    at = fb["at"]

    try:
        fbuser = FacebookUser.objects.get(facebook_id=fbid, access_token=at)
        fbuser.user = user
        fbuser.save()
    except FacebookUser.DoesNotExist:
        fbuser = FacebookUser()
        fbuser.user = user
        fbuser.facebook_id = fbid
        fbuser.access_token = at
        fbuser.save()

    return fbuser
Exemple #5
0
def create_fbuser(user, fb):

    fbid = fb["fbid"]
    at = fb["at"]

    try:
        fbuser = FacebookUser.objects.get(facebook_id=fbid, access_token=at)
        fbuser.user = user
        fbuser.save()
    except FacebookUser.DoesNotExist:
        fbuser = FacebookUser()
        fbuser.user = user
        fbuser.facebook_id = fbid
        fbuser.access_token = at
        fbuser.save()

    return fbuser