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

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-20 08:50:43  来源:igfitidea点击:

Package name & Class Name of facebook app

androidfacebookfacebook-graph-apifacebook-android-sdksocialshare

提问by Vivek Warde

Just a small confusion I want to ask while making a facebook app to implement share feature in my android appenter image description here

在制作 facebook 应用程序以在我的 android 应用程序中实现共享功能时,我想问一个小困惑在此处输入图片说明

Unique app Identifier used to open your app

用于打开您的应用程序的唯一应用程序标识符

  1. 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 ?
  1. 包名称:这是我在开发者控制台上创建新的 facebook 应用程序时编写的唯一标识符吗?还是我的 android 应用程序的包名?

The Main Activity you want Facebook to launch

您希望 Facebook 启动的主要活动

  1. 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?
  1. 类名:我在每个片段(类)中添加了一个 facebook 共享按钮,那么哪个类是它希望 facebook 启动的主要活动?或者它是我的 android 应用程序的主要活动?

采纳答案by Horatio

See this screenshot from Facebook's getting started documentation.

请参阅 Facebook 入门文档中的此屏幕截图。

回答by Mr X

add Package nameof your application in Package NameField add ActivityName in Class NameField. Like You have com.example.facebookas your package name . In that package you have many Activitybut you want to use Facebook Code in FbExampleActivitythen FbExampleActivityis your Class Name.

添加Package name您的应用程序包名称字段添加Activity名称在类名现场。Like You have com.example.facebookas 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.

总之,如果您不打算集成应用程序链接,只需将您的包和主要活动放在这里。