I am writing an Android app where I am trying to run the Facebook.authorize function. This function takes the following arguments:
Facebook.authorize(Activity, DialogListener());
Now, when I make this call in a static function, I tried passing a “Context” variable in the call like this:
public static void dummyFunction(Context context)
{
Facebook.authorize(context, new DialogListener(){});
}
And I make the call like so:
dummyfunction(this);
When I do all of that, I get the error:
The function Facebook.authorize(Context, DialogListener) is not applicable for the arguments Facebook.authorize(Activity, Dialoglistener).
Please tell me how I can pass a static “Activity” variable in this case.
Have you tried
and calling it
?