22

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

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 ?

The Main Activity you want Facebook to launch

  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?
Vivek Warde
  • 1,936
  • 8
  • 47
  • 77

3 Answers3

22

See this screenshot from Facebook's getting started documentation.

Horatio
  • 1,695
  • 1
  • 18
  • 27
8

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.

Mr X
  • 1,053
  • 2
  • 11
  • 24
  • 1
    The class name needs to be the fully qualified class name (so com.example.facebook.FbExampleActivity in this case). Also, the package name and class name are not strictly required if you just want to enable sharing. – Ming Li Jul 21 '14 at 22:51
  • @MingLi enable sharing? do you mean only login with facebook? – MaicolBen May 06 '15 at 15:43
  • I mean if you only want to use the share dialog or share button, then the class name is not required. – Ming Li May 06 '15 at 17:29
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.

thanhbinh84
  • 17,876
  • 6
  • 62
  • 69