问题
Just a small confusion I want to ask while making a facebook app to implement share feature in my android app
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 ?
The Main Activity you want Facebook to launch
- 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:
See this screenshot from Facebook's getting started documentation.
回答2:
add Package name
of your application in Package Name Field
add Activity
Name in Class Name Field.
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.
回答3:
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:
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)
deep link: https://developers.facebook.com/docs/app-ads/deep-linking
App Links on 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.
来源:https://stackoverflow.com/questions/24838476/package-name-class-name-of-facebook-app