- 浏览: 175070 次
- 性别:
- 来自: 深圳
文章分类
最新评论
-
MyTiny:
您那有ZK的文档么?
部署 ZK Spreadsheet -
cbhtdkjngjg:
给力,刚好用上了,楼主好人
WindowManager.LayoutParams.type属性 -
gaobohello1987:
你好,请问由dex转换成的jar中为什么没有main.clas ...
android classes.dex 反编译 -
743438102:
有没有例子啊客户端的
Android使用facebook api(二) -
REALGODO:
约尔迪 写道我想问一下,在内地可以直接使用git从这个库上拿下 ...
Android使用facebook api(一)
本文旨在介绍facebook的graph api
graph API 简介
facebook的graph api是一套REST化的api,通过统一而稳定URL定义请访问数据对象,通过对http协议的GET,POST,DELETE三种请求进行数据操作的细分,响应JSON格式的数据包,组成了facebook的 graph api。
- 首先看一个get请求的例子
https://graph.facebook.com/100000588112696,抓取User对象,格式客户端需要对response解析json格式,返回值如下。facebook-android/ios本身提供了sdk可以对json格式进行解析,其他平台需要额外写一套解析器来解析json格式。
{ "id": "100000588112696", "name": "Jiqiang Bi", "first_name": "Jiqiang", "last_name": "Bi", "link": "http://www.facebook.com/bijiqiang", "username": "bijiqiang", "gender": "male", "locale": "zh_CN" }
- 再来看一个post请求的例子
https://graph.facebook.com/100000588112696/feed/ 创建一个post请求的http将参数传入
{ "caption": "realgodo", "name": "realgodo", "link": "http://realgodo.iteye.com", "description": "Coming from my app", "link": "http://www.facebook.com/bijiqiang", "picture":"http://www.iteye.com/upload/logo/user/583286/acd59a73-6a14-3a17-a0ae-4ac30d5c43c8.png?1320570681" }
返回的数据是
{ "id": "100000588112696_302491803113754" }
graph Api能做什么
- 抓取(fetch)
可以查看全部可以使用的graph api 包括必要的参数,一般就是access_token。
首先 看一组使用access_token的get型接口列表,主要是抓取数据。
"home": "https://graph.facebook.com/100000588112696/home?access_token=",
"feed": "https://graph.facebook.com/100000588112696/feed?access_token=",
"friends": "https://graph.facebook.com/100000588112696/friends?access_token=",
"mutualfriends": "https://graph.facebook.com/100000588112696/mutualfriends?access_token=",
"family": "https://graph.facebook.com/100000588112696/family?access_token=",
"payments": "https://graph.facebook.com/100000588112696/payments?access_token=",
"activities": "https://graph.facebook.com/100000588112696/activities?access_token=",
"interests": "https://graph.facebook.com/100000588112696/interests?access_token=",
"music": "https://graph.facebook.com/100000588112696/music?access_token=",
"books": "https://graph.facebook.com/100000588112696/books?access_token=",
"movies": "https://graph.facebook.com/100000588112696/movies?access_token=",
"television": "https://graph.facebook.com/100000588112696/television?access_token=",
"games": "https://graph.facebook.com/100000588112696/games?access_token=",
"adaccounts": "https://graph.facebook.com/100000588112696/adaccounts?access_token=",
"likes": "https://graph.facebook.com/100000588112696/likes?access_token=",
"posts": "https://graph.facebook.com/100000588112696/posts?access_token=",
"tagged": "https://graph.facebook.com/100000588112696/tagged?access_token=",
"statuses": "https://graph.facebook.com/100000588112696/statuses?access_token=",
"links": "https://graph.facebook.com/100000588112696/links?access_token=",
"notes": "https://graph.facebook.com/100000588112696/notes?access_token=",
"photos": "https://graph.facebook.com/100000588112696/photos?access_token=",
"albums": "https://graph.facebook.com/100000588112696/albums?access_token=",
"events": "https://graph.facebook.com/100000588112696/events?access_token=",
"groups": "https://graph.facebook.com/100000588112696/groups?access_token=",
"videos": "https://graph.facebook.com/100000588112696/videos?access_token=",
"picture": "https://graph.facebook.com/100000588112696/picture?access_token=",
"inbox": "https://graph.facebook.com/100000588112696/inbox?access_token=",
"outbox": "https://graph.facebook.com/100000588112696/outbox?access_token=",
"updates": "https://graph.facebook.com/100000588112696/updates?access_token=",
"accounts": "https://graph.facebook.com/100000588112696/accounts?access_token=",
"checkins": "https://graph.facebook.com/100000588112696/checkins?access_token=",
"apprequests": "https://graph.facebook.com/100000588112696/apprequests?access_token=",
"friendlists": "https://graph.facebook.com/100000588112696/friendlists?access_token=",
"friendrequests": "https://graph.facebook.com/100000588112696/friendrequests?access_token=",
"permissions": "https://graph.facebook.com/100000588112696/permissions?access_token=",
"notifications": "https://graph.facebook.com/100000588112696/notifications?access_token=",
"scores": "https://graph.facebook.com/100000588112696/scores?access_token="
- 查询功能(search)
All public posts: https://graph.facebook.com/search?q=watermelon&type=post People: https://graph.facebook.com/search?q=mark&type=user Pages: https://graph.facebook.com/search?q=platform&type=page Events: https://graph.facebook.com/search?q=conference&type=event Groups: https://graph.facebook.com/search?q=programming&type=group Places: https://graph.facebook.com/search?q=coffee&type=place¢er=37.76,122.427&distance=1000 Checkins: https://graph.facebook.com/search?type=checkin
- 发布功能(publish)
https://graph.facebook.com/${PROFILE_ID}/feed
https://graph.facebook.com/${OBJECT_ID}/comments https://graph.facebook.com/${OBJECT_ID}/likes https://graph.facebook.com/${PROFILE_ID}/notes https://graph.facebook.com/${PROFILE_ID}/links https://graph.facebook.com/${PROFILE_ID}/events https://graph.facebook.com/${EVENT_ID}/attending https://graph.facebook.com/${EVENT_ID}/maybe https://graph.facebook.com/${EVENT_ID}/declined https://graph.facebook.com/${PROFILE_ID}/albums https://graph.facebook.com/${ALBUM_ID}/photos https://graph.facebook.com/${PROFILE_ID}/checkins
${PROFILE_ID}是User.id,${ALBUM_ID}是Album.id
- 删除功能
https://graph.facebook.com/${ID}?access_token=... HTTP/1.1
${ID}是对象的主键,规则是${User.id}_${Object.id}
其他的功能类别还包括分析(Analytics),批量操作(Batch Requests)
- graph api class介绍
Achievement 附件
用户的附件
Album 相册
招聘相册
Application应用程序
在facebook注册的应用程序
Checkin签到
Comment评论
Domain域名
Event facebook事件
FriendList 朋友列表
Group 群组
Insights 统计分析
app,页面,域名的统计分析结果
Link 链接
分享的链接
Message 消息
线程内消息
Note提示
Page 页面
Photo照片
Post 涂鸦墙内容
Question 问题
用户提问
QuestionOption 备选答案
用户提问的一个备选答案
Review反馈
对app的反馈
Status message 涂鸦墙消息
Subscription订阅
Thread 消息线程
User 用户
Video 视频
发表评论
-
4.0原生来电归属地合入
2013-11-22 10:59 0本教程使用反编译的方式合入原生的4.0.4来电归属地, ... -
比较详尽的Android系统文件夹文件功能介绍
2013-10-31 10:51 3237但凡折腾rom的机油都知道,解压rom压缩包后,有个sy ... -
Android updater-script脚本语法规则
2013-10-29 16:55 1646这是Android系统来运行upd ... -
android classes.dex 反编译
2013-07-19 14:33 28342Step 1 获取classes.dex ... -
android项目使用jiffies来测量CPU耗电情况
2013-06-21 11:49 3910调试android程序是否耗电时候可采用单位时间内监控j ... -
WindowManager.LayoutParams.type属性
2013-01-31 11:01 32438type 的取值: 应用程序窗口。 ... -
Android 最佳实践
2012-10-23 10:29 2702Android 官方文档关于最佳实践部分的翻译 ... -
Android StackOverflow现象小节
2012-06-15 08:35 45121.太复杂的页面布局导致StackOverflow ... -
将Android应用移植到BlackBerry PlayBook上
2012-05-30 11:28 1484BlackBerry的平板电脑playbook支持将andr ... -
Android使用facebook api(二)
2011-11-06 23:03 8035本文重点介绍下facebook接入的一些背景知识,本身其实与 ... -
Android使用facebook api(一)
2011-11-06 17:05 8130在android项目中使用facebook api,face ... -
Android UI大杂烩
2011-09-30 13:42 1145did与px的换算公式 dip = px * 1 ... -
进入android项目组的第一周
2011-08-12 17:33 13进入项目组已经一周时间了,这一周比较紧张,工作也很紧凑,收 ... -
进入android项目组的第二天
2011-08-05 09:11 10昨天,新成立的移动开发团队组织活动,宿醉为醒,早上头还有点痛 ... -
进入android项目组的第一天
2011-08-04 13:44 1335今天正式进入了android ...
相关推荐
Android基于Facebook Rebound的动画效果框架是一个基于Facebook Rebound的动效框架Backboard,封装了一些API,便于开发者更方便的把View与Motion结合起来,一些效果很棒
适用于 Android 的 Facebook SDK 的当前版本是 11.2.0,需要 Android API 15。适用于 Android 的 Facebook SDK 的代码和示例可在 GitHub 上找到。一种安全便捷的方式,方便用户使用 Facebook 凭据登录您的应用或网站...
[Deprecated] android-simple-facebook Currently this lib was tested and works with graph api v2.3 and below. For now, I don't have much time to maintain this library anymore. Beside this, Facebook made...
适用于Facebook受众群体网络的Android演示应用程序 新闻订阅源应用程序可演示与原生广告集成。 入门 请按照本为Audience Network注册一个帐户并设置广告展示位置。 从获取News API的API密钥。 替换fb-audience-...
这是一款Android 新浪、腾讯、人人、豆瓣、Facebook、Twitter OAuth认证实例源码,豆瓣使用的是OAuth1.0,新浪、腾讯、人人、QQ则都是使用OAuth2.0,Fackbook和Twitter直接使用官方的sdk和api。 使用方法:导入...
1、Android显示GIF动画 GifView GifView 是一个为了解决android中现在...它被设计成通过一个API就能够很方便使用所有版本的Android操作栏的设计模式。 20、JakeWharton-Android-ViewPagerIndicator 界面切换的效果。
RetroFacebook turns Facebook API into a Java interface using RxJava. Easy to add API and model for facebook. Inspired by retrofit. Live DEMO / DEMO app Usage My posts: Before: GraphRequest request...
Fresco 是一个强大的图片加载组件。 Fresco 中设计有一个叫做 image pipeline 的模块...Fresco 支持 Android2.3(API level 9) 及其以上系统。 配合工具类使用,妥妥的。 详细参考api文档 http://www.fresco-cn.org/
FacebookImagePicker.zip,android facebook图像选择器android facebook图像选择器,使用kotlin、rxjava2和facebook的图形api构建
FacebookMessengerBot.js - a Node ES5/6 API for the new Facebook Messenger Bot Platform Scribe.js - a Node ES5/6 logging system with a web interface Screenshot Demo Recent 01/11/2015 ► Added ...
The Facebook API v2 does NOT return the entire friend list, only the users that also have authorized this app. The API v1 was removed after April 30 2015, practically breaking this app. Copyright (C)...
一个用于从本地SDK安装中连接Facebook的插件$ npm i-保存git + https://github.com/laituanmanh32/capacitor-facebook-plugin.git $ npx cap sync Android配置在文件android / app / src / main /中java / ** / ** ...
android 2.2 Google API 下开发的一个事件管理程序,可以在地图上显示事件,并且进行导航, 可以在日历中查看事件,并且结合事件记录与分享,一键上传照片到picsa 和 facebook
Google,Facebook和Firebase API用于支持该项目。 技术细节: ---- backend ---- Firebase API充当此项目的后端服务器。 ---- UI ----底部导航用于在新闻源,列出好友,地图好友,聊天活动(片段)之间切换。 ...
远足马拉松远足Messenger Messenger马拉松应用我开发此应用程序是为了进一步了解Android硬件API和Facebook API。 该应用程序的作用是让您登录到Facebook帐户,它将从您的Facebook帐户中获取所有信息并显示出来。 这...
社交媒体应用程序克隆(Instagram,Facebook,链接等)+ Node.js套接字聊天+呼叫+直播 使用的技术 Flutter- iOS android app PHP -管理面板和其他API Nodejs for chat(socket.io) Firebase -用于推送通知 AWS -...
索引入门内部体系结构跟踪处理和分析API当前,没有一个API是稳定的,它们在发布之前会发生变化(主要是为了使它们更易于使用)。 用法示例java / main / com / facebook / profilo / sample中的示例应用程序显示了...
Android 的 go-gcm 库的 Google Cloud Message(现为 Firebase Cloud Messaging)支持使用 apns2 库的苹果推送通知服务支持 YAML 配置支持使用命令行发送单个 Android 和 iOS 通知支持使用 Web API 推送通知...
+版本,使用android GPS技术,Google Maps API,Facebook API和SQLite数据库。 #####您必须将以下开发密钥替换为您自己的注册密钥: 在RouteTrackerGui.java中:私有静态最终字符串FACEBOOK_APPID 在strings.xml...
在JAVA中创建一个使用该API的客户端。 各种书架,设计更令人赏心悦目,可在找到 用于与Facebook页面通信的 徽标和其他图标的 ,其中一些来自网站然后进行了编辑。 描述 Life Goals App是一个android应用程序,我们...