Note that there are some explanatory texts on larger screens.

plurals
  1. POFacebook Dialog Tutorial - Is Something Missing?
    text
    copied!<p>This is code from the following page: <a href="https://developers.facebook.com/docs/android/share-dialog/#setup" rel="nofollow">https://developers.facebook.com/docs/android/share-dialog/#setup</a></p> <p>I'm trying to get this to work but am extremely confused with the "callback" argument when instantiating the UILifecycleHelper class. (Looking at the tutorial code) I dont see where this variable is coming from. Ive attempted to create a null object and pass it, but (surprise) got a NullPointerException.</p> <p>Has Facebook forgot a step here or is it there some impicit knowledge from which my lack of understanding Callbacks are coming back to haunt me? </p> <pre><code>@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); uiHelper = new UiLifecycleHelper(this, callback); // line 45 in code uiHelper.onCreate(savedInstanceState); } </code></pre> <p>Thank you for your assistance</p> <p>// EDIT (Again) - wrong trace</p> <p>Here's the stack trace - there's a lot of ECLIPSE errors to wade through as well (cant figure how to get rid of them all), so just ignore those:</p> <pre><code>09-16 19:24:20.533: E/AndroidRuntime(1348): FATAL EXCEPTION: main 09-16 19:24:20.533: E/AndroidRuntime(1348): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.theperspectableone.carddisplayertemplate/com.theperspectableone.carddisplayertemplate.MainActivity}: java.lang.NullPointerException: Argument 'applicationId' cannot be null 09-16 19:24:20.533: E/AndroidRuntime(1348): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2211) 09-16 19:24:20.533: E/AndroidRuntime(1348): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2261) 09-16 19:24:20.533: E/AndroidRuntime(1348): at android.app.ActivityThread.access$600(ActivityThread.java:141) 09-16 19:24:20.533: E/AndroidRuntime(1348): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1256) 09-16 19:24:20.533: E/AndroidRuntime(1348): at android.os.Handler.dispatchMessage(Handler.java:99) 09-16 19:24:20.533: E/AndroidRuntime(1348): at android.os.Looper.loop(Looper.java:137) 09-16 19:24:20.533: E/AndroidRuntime(1348): at android.app.ActivityThread.main(ActivityThread.java:5103) 09-16 19:24:20.533: E/AndroidRuntime(1348): at java.lang.reflect.Method.invokeNative(Native Method) 09-16 19:24:20.533: E/AndroidRuntime(1348): at java.lang.reflect.Method.invoke(Method.java:525) 09-16 19:24:20.533: E/AndroidRuntime(1348): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:737) 09-16 19:24:20.533: E/AndroidRuntime(1348): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553) 09-16 19:24:20.533: E/AndroidRuntime(1348): at dalvik.system.NativeStart.main(Native Method) 09-16 19:24:20.533: E/AndroidRuntime(1348): Caused by: java.lang.NullPointerException: Argument 'applicationId' cannot be null 09-16 19:24:20.533: E/AndroidRuntime(1348): at com.facebook.internal.Validate.notNull(Validate.java:29) 09-16 19:24:20.533: E/AndroidRuntime(1348): at com.facebook.Session.&lt;init&gt;(Session.java:227) 09-16 19:24:20.533: E/AndroidRuntime(1348): at com.facebook.Session.&lt;init&gt;(Session.java:212) 09-16 19:24:20.533: E/AndroidRuntime(1348): at com.facebook.UiLifecycleHelper.onCreate(UiLifecycleHelper.java:87) 09-16 19:24:20.533: E/AndroidRuntime(1348): at com.theperspectableone.carddisplayertemplate.MainActivity.onCreate(MainActivity.java:45) 09-16 19:24:20.533: E/AndroidRuntime(1348): at android.app.Activity.performCreate(Activity.java:5133) 09-16 19:24:20.533: E/AndroidRuntime(1348): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1087) 09-16 19:24:20.533: E/AndroidRuntime(1348): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2175) 09-16 19:24:20.533: E/AndroidRuntime(1348): ... 11 more </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload