为Facebook应用程序获取每个标签页的唯一ID [英] Getting a unique ID per tab page for a facebook app

查看:141
本文介绍了为Facebook应用程序获取每个标签页的唯一ID的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

开发一个主要在标签页上下文中使用的Facebook应用程序。对于添加此应用程序的每个人员,应该有独特的数据视图,专门为其标签页显示。有没有办法每个安装获得唯一的标识符?

Working on developing a facebook app that will primarily be used within the context of a tab page. For each person adding this app there should be a unique view of data that is shown specifically for their tab page. Is there a way to get a unique identifier per installation to key that off of?

推荐答案

当然可以。 Facebook将发送 signed_request 中的页面ID(听起来很独特?;-)):

Of course it's possible. Facebook will send the page id in the signed_request (sounds unique enough? ;-) ):


当用户浏览到Facebook
页面时,他们将在下一个可用的选项卡
位置中看到您的Page Tab
。一般来说,页面选项卡的
的加载方式与
Canvas页面完全相同。当用户选择您的
页面选项卡时,您将收到
signed_request 参数,其中一个
附加参数。这个
参数包含一个JSON对象,
一个id(当前
页面的页面ID), admin (如果用户是一个admin
的页面),而喜欢(如果用户
喜欢的页面)。与Canvas
页面一样,您将不会收到
应用程序在$ code> signed_request 中可访问的所有
用户信息,直到
用户授权您的应用程序。

When a user navigates to the Facebook Page, they will see your Page Tab added in the next available tab position. Broadly, a Page Tab is loaded in exactly the same way as a Canvas Page. When a user selects your Page Tab, you will received the signed_request parameter with one additional parameter, page. This parameter contains a JSON object with an id (the page id of the current page), admin (if the user is a admin of the page), and liked (if the user has liked the page). As with a Canvas Page, you will not receive all the user information accessible to your app in the signed_request until the user authorizes your app.

来源

这篇关于为Facebook应用程序获取每个标签页的唯一ID的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆