跳转到主要内容

Python中singly API的实现

项目描述

Python中singly API的实现

安装

pip install open-singly

pip install git+https://github.com/MagicSolutions/open-singly.git

如何使用

from open_singly import Singly

client_id = 'My_Client_ID'
client_secret = 'My_Client_Secret'
redirect_uri = 'http://www.mywebsite.com/singly/callback/'

singly = Singly(client_id, client_secret, redirect_uri)

# Get authentication URL for facebook for example
auth_url = singly.get_authentication_url('facebook')

# The user must be redirected to this URL. After authentication
# Singly will redirect user to your redirect_uri
# in the GET parameters there will be a code which You must
# provide to Singly.authenticate metod

api = singly.authenticate(code)

# After successfull authentication you can execute all methods
# provided from Singly API like that

all_profiles = api.profile.get(verify='true')

facebook_data = api.profiles.facebook.get()

facebook_friends = api.services.facebook.friends.get()

享受!

项目详情


发布历史 发布通知 | RSS源

下载文件

为您的平台下载文件。如果您不确定要选择哪一个,请了解更多关于 安装包 的信息。

源分布

open-singly-0.2.tar.gz (3.4 kB 查看散列)

上传时间:

支持者:

AWS AWS 云计算和安全赞助商 Datadog Datadog 监控 Fastly Fastly CDN Google Google 下载分析 Microsoft Microsoft PSF 赞助商 Pingdom Pingdom 监控 Sentry Sentry 错误日志 StatusPage StatusPage 状态页面