跳转到主要内容

社交网络包装器的包装器

项目描述

wrap2:社交网络包装器的库

wrap2 软件包是各种社交网络包装器的包装器。不同的网络有不同的“帖子”格式。Twitter被选为标准,因此其他网络的帖子被转换为类似Twitter的格式。

https://api.travis-ci.org/paylogic/wrap2.png https://pypip.in/v/wrap2/badge.png https://coveralls.io/repos/paylogic/wrap2/badge.png?branch=master

安装

pip install wrap2

用法

from wrap2 import fbook
fb = fbook.Facebook('id', 'secret')

# get authorization url on Facebook
url, opts = fb.get_authorization_url('http://example.com', scope=('read', 'write'))

# get access token and profile info
id, access_token, name, link = fb.on_authorization_callback(
    'http://facebook.com/some_callback_url', code='some code')

# Put a post on the wall of the user authorized by ``access_token``.
post = fb.post(access_token)


from wrap2 import twitter
tw = twitter.Twitter('id', 'secret')

# get authorization url on Twitter
url, opts = tw.get_authorization_url('http://example.com')

# get access token and profile info
id, (access_token_key, access_token_secret), name, link = tw.on_authorization_callback(
    'http://twitter.com/some_callback_url',
    oauth_verifier='some oauth verifier', request_token='some request token')

# Put an update status of the user authorized by ``access_token``.
post = tw.post(access_token)

联系

如果您有任何问题、错误报告、建议等,请在GitHub项目页面上创建一个问题。

许可

本软件根据MIT许可授权。

查看许可

© 2013 Paylogic International.

变更日志

0.9

  • 首次公开发布

项目详情


下载文件

下载适合您平台的应用程序。如果您不确定选择哪个,请了解有关安装包的更多信息。

源分布

wrap2-0.9.tar.gz (6.7 kB 查看哈希)

上传时间:

支持者

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