distriqt / airnativeextensions

DEPRECATED: Original repository of the distriqt native extensions and is no longer maintained. Please see our site for the latest ANEs
https://airnativeextensions.com
2 stars 0 forks source link

Question about FacebookAPI #260

Closed minimedj closed 9 years ago

minimedj commented 9 years ago

When I run this code (iOS):

FacebookAPI.service.openRequestsDialog();

I get:

[Fault] exception, information=TypeError: Error #1009: Cannot access a property or method of a null object reference.
[trace] IDS_CONSOLE_SANDBOX
[trace] IDS_CONSOLE_SECURITY_CONTEXT
[trace] [UNCAUGHT ERROR] Error #1009: Cannot access a property or method of a null object reference.

What could be a reason? I check examples you provide that there is nothing about FacebookAPI.service.openRequestsDialog(). Please help me to resolve this issue.

koriner commented 9 years ago

You need to pass a FacebookAppRequestsParams object to the openRequestDialog method, are you doing that?

minimedj commented 9 years ago

No... Because function call accept no parameters... Can you please tell what I have to pass as a param?

koriner commented 9 years ago

It should accept two parameters, as you can see in the docs: http://docs.airnativeextensions.com/facebookapi/docs/

An example would be

var params:FacebookAppRequestParams = new FacebookAppRequestParams();
params.app_id = "your facebook app id"
params.message = "The request message";
FacebookAPI.service.openRequestsDialog( params, requestDialogResultHandler );

Can you try this?

minimedj commented 9 years ago

Thank you for you tip. Tomorrow morning this is first thing to try!

minimedj commented 9 years ago

Everything work as expected. Please add detailed description for requestDialogResultHandler into your docs. I did manage to handle it, but other might have troubles with it.