dounuo9921 2012-04-11 06:09
浏览 82
已采纳

Facebook的用户区域设置与其语言的设置相同吗?

For an app I'm developing for Facebook, when the user first logs in, I'd like for my interface to be in the language they have chosen for their Facebook interface.

(More accurately, since Facebook has more language options than I do, I'll see if their language is among my list of languages, and if so use that language. If not, default to English.)

I know I can get the user's locale from the list of columns they keep of user data.

However, I'm unclear if the locale is equal to their language. If an American lives in Beijing, and sets their interface to use English, wouldn't their locale be China? If I go by that, my interface might be in Chinese, which, depending on the American, could be different from their Facebook interface.

I notice on the same list, there is an array of languages that the user can set if they are multilingual, but I'm not sure if that's a really good indicator of anything. People tend to list languages they can only partially speak, so it might not be helpful to try and go through that list.

Bottom line, what exactly should I do to get a Facebook user's interface language from my PHP script in my canvas directory?

  • 写回答

2条回答 默认 最新

  • doupian9490 2012-04-11 06:41
    关注

    The locale setting in this case is the user's currently selected user interface language.
    See for yourself in the Graph API Explorer. (Change your own language at the bottom of the page)

    Keep in mind that you can access the locale information from the signed request even before the user has authorized your app.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?

悬赏问题

  • ¥100 连续两帧图像高速减法
  • ¥15 组策略中的计算机配置策略无法下发
  • ¥15 如何绘制动力学系统的相图
  • ¥15 对接wps接口实现获取元数据
  • ¥20 给自己本科IT专业毕业的妹m找个实习工作
  • ¥15 用友U8:向一个无法连接的网络尝试了一个套接字操作,如何解决?
  • ¥30 我的代码按理说完成了模型的搭建、训练、验证测试等工作(标签-网络|关键词-变化检测)
  • ¥50 mac mini外接显示器 画质字体模糊
  • ¥15 TLS1.2协议通信解密
  • ¥40 图书信息管理系统程序编写