NPi*_*ike 66
看看最新的Facebook apk(1.6),看起来"facebook://"和"fb://"都是注册协议.
Facebook的://
facebook:/chat
facebook:/events
facebook:/friends
facebook:/inbox
facebook:/info
facebook:/newsfeed
facebook:/places
facebook:/requests
facebook:/wall
Run Code Online (Sandbox Code Playgroud)
FB://
fb://root
fb://feed
fb://feed/{userID}
fb://profile
fb://profile/{userID}
fb://page/{id}
fb://group/{id}
fb://place/fw?pid={id}
fb://profile/{#user_id}/wall
fb://profile/{#user_id}/info
fb://profile/{#user_id}/photos
fb://profile/{#user_id}/mutualfriends
fb://profile/{#user_id}/friends
fb://profile/{#user_id}/fans
fb://search
fb://friends
fb://pages
fb://messaging
fb://messaging/{#user_id}
fb://online
fb://requests
fb://events
fb://places
fb://birthdays
fb://notes
fb://places
fb://groups
fb://notifications
fb://albums
fb://album/{%s}?owner={#%s}
fb://video/?href={href}
fb://post/{postid}?owner={uid}¹
Run Code Online (Sandbox Code Playgroud)
很抱歉,如果我错过了一些...只在模拟器中与少数人一起玩,看看他们是否真的有效 - 其中一堆将导致Facebook应用程序崩溃.
¹ 其中postid的uid_postid格式,例如11204705797_10100412949637447
Pat*_*oos 46
要启动默认的Launcher活动:
Intent intent = new Intent("android.intent.category.LAUNCHER");
intent.setClassName("com.facebook.katana", "com.facebook.katana.LoginActivity");
startActivity(intent);
Run Code Online (Sandbox Code Playgroud)
我做了一些研究,因为我想找到这个:).我找到了一些方法,可以轻松地开始不同的活动.但我不能保证这会在facebook升级后起作用.我用我当前的Facebook应用程序测试它,它的工作原理.至少我使用"ad start ....."用"adb shell"测试了它.
基本是:
String uri = "facebook://facebook.com/inbox";
Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse(uri));
startActivity(intent);
Run Code Online (Sandbox Code Playgroud)
没有检查facebook.com部分.你甚至可以输入:"facebook://gugus.com/inbox"具有相同的效果.
如何在adb中执行此操作.
1. Start adb shell through console: "adb shell"
2. run: "am start -a android.intent.action.VIEW -d facebook://facebook.com/inbox"
Run Code Online (Sandbox Code Playgroud)
这将启动收件箱活动.这里有一些带例子的Uris.我认为他们能说出自己的所作所为.
facebook://facebook.com/inbox
facebook://facebook.com/info?user=544410940 (id of the user. "patrick.boos" won't work)
facebook://facebook.com/wall
facebook://facebook.com/wall?user=544410940 (will only show the info if you have added it as friend. otherwise redirects to another activity)
facebook://facebook.com/notifications
facebook://facebook.com/photos
facebook://facebook.com/album
facebook://facebook.com/photo
facebook://facebook.com/newsfeed
Run Code Online (Sandbox Code Playgroud)
你可以给某些uris提供additianl参数,但我没有时间浏览这些活动的所有代码.
我是怎么做到的?看看apktool.
如果有人想直接打开照片
public Intent getOpenFacebookIntent(String pId) {
try {
activity.getPackageManager().getPackageInfo("com.facebook.katana", 0);
return new Intent(Intent.ACTION_VIEW, Uri.parse("facebook:/photos?album=0&photo=" + pId + "&user=" + ownerId));
} catch (Exception e) {
return new Intent(Intent.ACTION_VIEW, Uri.parse("https://www.facebook.com/"));
}
}
startActivity(getOpenFacebookIntent(pid));
Run Code Online (Sandbox Code Playgroud)
这里ownerId是Facebook的id谁上传的这张照片,并且用户的pid是PhotoId
请享用 :))
| 归档时间: |
|
| 查看次数: |
51615 次 |
| 最近记录: |