Python 訪问 LinkedIn (API)
CODE:
#!/usr/bin/python
# -*- coding: utf-8 -*- '''
Created on 2014-8-16
@author: guaguastd
@name: login.py
''' # twitter login
def linkedin_login(): from linkedin import linkedin CONSUMER_KEY = ''
CONSUMER_SECRET = ''
USER_TOKEN = ''
USER_SECRET = '' RETURN_URL = '' #developer does not need this # Instantiate the developer authentication class
auth = linkedin.LinkedInDeveloperAuthentication(CONSUMER_KEY, CONSUMER_SECRET,
USER_TOKEN, USER_SECRET, RETURN_URL, permissions=linkedin.PERMISSIONS.enums.values())
linkedin_api = linkedin.LinkedInApplication(auth) return linkedin_api
#!/usr/bin/python
# -*- coding: utf-8 -*- '''
Created on 2014-8-16
@author: guaguastd
@name: user_profile_get.py
''' # import login
from login import linkedin_login # import json
import json # access to linkedin api
linkedin_api = linkedin_login() # use api to access user profile
profiles = linkedin_api.get_profile() # print the profiles
print json.dumps(profiles, indent=1)
RESULT:
{
"headline": "Computer Networking Professional",
"lastName": "zhouping",
"siteStandardProfileRequest": {
"url": "http://www.linkedin.com/profile/view?id=324082475&authType=name&authToken=oPyB&trk=api*a3620151*s3691851*"
},
"firstName": "beyond"
}
Python 訪问 LinkedIn (API)的更多相关文章
- python訪问redis
python訪问redis 1 Linux上安装redis a) 下载 $ wget http://download.redis.io/releases/redis-3.0.5.tar.gz b) 编 ...
- ASP.NET MVC 提供与訪问 Web Api
ASP.NET MVC 提供与訪问 Web Api 一.提供一个 Web Api 新建一个项目.类型就选 "Web Api". 我用的是MVC5,结果生成的项目一大堆东西.还编译只 ...
- Python 訪问Google+ (http)
CODE: #!/usr/bin/python # -*- coding: utf-8 -*- ''' Created on 2014-8-28 @author: guaguastd @name: l ...
- python 訪问webservice
<span style="font-family: Arial, Helvetica, sans-serif; background-color: rgb(255, 255, 255) ...
- 数据库訪问技术之JDBC
版权声明:本文为博主原创文章,未经博主同意不得转载. https://blog.csdn.net/zhuojiajin/article/details/32150883 在了解JDBC之前呢, ...
- python文件和文件夹訪问File and Directory Access
http://blog.csdn.net/pipisorry/article/details/47907589 os.path - Common pathname manipulations 都是和路 ...
- Kivy A to Z -- 怎样从python代码中直接訪问Android的Service
在Kivy中,通过pyjnius扩展能够间接调用Java代码,而pyjnius利用的是Java的反射机制.可是在Python对象和Java对象中转来转去总让人感觉到十分别扭.好在android提供了b ...
- 实战DeviceIoControl 之中的一个:通过API訪问设备驱动程序
P.bhw98 { PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 9pt; PADDING-BOTTOM: 0px; MARGIN: 10px 0 ...
- struts2訪问servlet的API
1.struts作为控制器,正常非常多时候要訪问到servlet的API.经常使用功能: (1).获取请求參数,控制界面跳转 (2).把共享数据存储于request,session,servl ...
随机推荐
- shell 判断脚本参数
测试登陆脚本 ./test.sh -p 123 -P 3306 -h 127.0.0.1 -u root #!/bin/sh ];then echo "USAGE: $0 -u user - ...
- [译]使用chage来管理Linux密码过期时间的七个例子
本文译自 7 Examples to Manage Linux Password Expiration and Aging Using chage 本文主要介绍命令chage的使用,译文会对原文内容会 ...
- 由于找不到MSVCP20.dll,无法继续执行代码
系统:win10 专业版,刚升级win10没几天 mysql 5.7.21 解压安装,初始化时报错,错误如图: 一.查找错误原因 参考:MySQL安装使用遇到的问题, 找到微软中文官方网站,搜索 ms ...
- struct termios结构体详解
一.数据成员 termios 函数族提供了一个常规的终端接口,用于控制非同步通信端口. 这个结构包含了至少下列成员:tcflag_t c_iflag; /* 输入模式 */tcflag_t ...
- H5开发APP考题和答案
{ "last_updated": { "$date": 1544276670569 }, "page_count": 1, "a ...
- Java中抽象类概述
抽象类 1.抽象类的定义 抽象类是为子类提供一个规范,这就必须联系到继承: 抽象类的制定就是让子类继承的: public abstract 类名{ //类体 //抽象方法 修饰符 abstract ...
- mysql存储表情字符
windows下是my.inilinux下是my.cnf 路径是: /etc/my.cnf 参考: https://blog.csdn.net/fhzaitian/article/details/53 ...
- Linux屏幕记录命令script
Script -a action.log –t 2> time.log按ctrl+d 退出录制回访 scriptreplay time.log action.log或者直接用查看命令cat,ta ...
- TcxGrid 选中 整行
- THUSC 2018 酱油记
THUSC 2018 酱油记 游记分类:游记 Day \((-inf,-2]\) 自CTSC和APIO挂烂以后,仍然在停课集训,不过好像这两波考试让我的RP涨了一大波,因此模拟赛大多都考的不错,虽然经 ...