Android facebook 应用程序的包名和类名
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/24838476/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Package name & Class Name of facebook app
提问by Vivek Warde
Just a small confusion I want to ask while making a facebook app to implement share feature in my android app
在制作 facebook 应用程序以在我的 android 应用程序中实现共享功能时,我想问一个小困惑
Unique app Identifier used to open your app
用于打开您的应用程序的唯一应用程序标识符
- Package Name:Is it that unique identifier that I have written while creating the new facebook app at their developer console ? or Is it the package name of my android app ?
- 包名称:这是我在开发者控制台上创建新的 facebook 应用程序时编写的唯一标识符吗?还是我的 android 应用程序的包名?
The Main Activity you want Facebook to launch
您希望 Facebook 启动的主要活动
- Class Name:I have added a facebook share button in every fragment(class), so which class is the Main Activity that it want facebook to launch ? Or is it the main activity of my android app?
- 类名:我在每个片段(类)中添加了一个 facebook 共享按钮,那么哪个类是它希望 facebook 启动的主要活动?或者它是我的 android 应用程序的主要活动?
采纳答案by Horatio
回答by Mr X
add Package name
of your application in Package NameField
add Activity
Name in Class NameField.
Like You have com.example.facebook
as your package name .
In that package you have many Activity
but you want to use Facebook Code in FbExampleActivity
then FbExampleActivity
is your Class Name.
添加Package name
您的应用程序包名称字段添加Activity
名称在类名现场。Like You have com.example.facebook
as your package name 。在那个包中,你有很多,Activity
但你想使用 Facebook 代码,FbExampleActivity
然后FbExampleActivity
是你的类名。
回答by thanhbinh84
I haven't tried yet, but it seems that these fields for deep link only. It is useful when you want Facebook to show ads linking to your app. In case users click on an ad:
我还没有尝试过,但似乎这些字段仅用于深层链接。当您希望 Facebook 显示链接到您的应用程序的广告时,它非常有用。如果用户点击广告:
if your app was installed on user's device (based on the package name you defined here), it will send an intent to your activity (base on class name you defined here). This activity will handle the intent.
Otherwise, it will go to your application on google play (again, base on the package name you define here)
如果您的应用程序安装在用户的设备上(基于您在此处定义的包名称),它将向您的活动发送一个意图(基于您在此处定义的类名)。此活动将处理意图。
否则,它将转到您在 google play 上的应用程序(同样,基于您在此处定义的包名称)
deep link: https://developers.facebook.com/docs/app-ads/deep-linking
深层链接:https: //developers.facebook.com/docs/app-ads/deep-linking
App Links on Android: https://developers.facebook.com/docs/applinks/android
Android 上的应用链接:https: //developers.facebook.com/docs/applinks/android
In conclusion, if you are not going to integrate app links, just put your package and main activity here.
总之,如果您不打算集成应用程序链接,只需将您的包和主要活动放在这里。