0 Favourites

Does cranberryfacebook plugin works for IOS?

  • Hi,

    I'm developing an IOS game. The game is complete, now I want to share score of a user when the user hits the share button.

    I tried the official C2 fb plugin, I created a test app to in the main app on my facebook developer account. I inserted the App ID and App Secret in the plugin. When I try that on my desktop browser it shows the below error.

    "Given URL is not permitted by the Application configuration: One or more of the given URLs is not permitted by the App's settings. It must match the Website URL or Canvas URL, or the domain must be a subdomain of one of the App's domains."

    I tired testing on my device thinking that it would work on the device, as I added IOS platform on my facebook developer account, but when I hit the share button nothing is happening.

    Here are the events I defined,

    On start of layout -> Facebook plugin -> login

    On touch share

    -> Facebook plugin, if logged in -> share on wall "Some Text"

    else

    -> Facebook plugin -> login

    -> share on wall "Some Text"

    Because the official facebook plugin is not working, I tried the cranberryfacebook plugin. I defined the events similar to the events defined with the official facebook plugin. I tired testing on the device using intel XDK test app. Same has happened, it's not working. I tried uploading the app through the apploader of iTunes Connect but it is not getting uploaded. Earlier, without cranberry plugin it got uploaded.

    Does this plugin works for IOS?

    Please help me with a solution.

  • Somebody please help.

  • As it is help in regards to a specific third-part plugin, you should actually directly post help request in the official topic for the addon so the author can help you out.

  • Kyatric thanks for response. I also used the official C2 plugin, but it isn't working. Could please help me with that?

    Here are the steps I followed

    "I tried the official C2 fb plugin, I created a test app to in the main app on my facebook developer account. I inserted the App ID and App Secret in the plugin. When I try that on my desktop browser it shows the below error.

    "Given URL is not permitted by the Application configuration: One or more of the given URLs is not permitted by the App's settings. It must match the Website URL or Canvas URL, or the domain must be a subdomain of one of the App's domains."

    I tired testing on my device thinking that it would work on the device, as I added IOS platform on my facebook developer account, but when I hit the share button nothing is happening.

    Here are the events I defined,

    On start of layout -> Facebook plugin -> login

    On touch share

    -> Facebook plugin, if logged in -> share on wall "Some Text"

    else

    -> Facebook plugin -> login

    -> share on wall "Some Text""

  • I'm not familiar with using the FB plugin, so I cannot help further and invite you to search the forums in case some others informations are there that you might have missed on.

  • sudeep98 I do not think the "native" facebook plugin works with mobile apps for the same reason the Twitter plugin does not work.

    Twitter plugin compatibility

    Since the Twitter API depends on opening separate browser windows, it usually only works inside a normal web browser. This means the button may not work when built in to a native app for Android or iOS, such as with Crosswalk, Ejecta or CocoonJS. To work around this, use the Browser object's Open URL in new window action to open a Twitter page instead.

    I am having the same problem with cranberry's facebook plugin. "Given URL..." I was advised to use cranberry's shareapp plugin because it is easier to use and it allows you to share to multiple online social media sites. I have not gotten around to trying it yet. Will let you know if I get to it later.

  • CDogs1964 Yes, please let me know the output after using it. I somehow managed to share on facebook using cranberry's facebook plugin. Here are the steps that I followed:

    1. Step up the app on your facebook developers account.

    2. Add a platform, android or iOS or windows, of which you are developing.

    3. Add a testapp within the main app just created.

    I use intel XDK to build the app

    4. Then follow this link https://dl.dropboxusercontent.com/u/186 ... index.html

    The cranberry's facebook plugin is working for me.

  • Construct 3

    Buy Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Buy Now Construct 3 users don't see these ads
  • sudeep98 I tried using the method in the link. (Which Sang Ki suggessted too) I obviously replaced the values with those of my game.

    <intelxdk:plugin intelxdk:name="https://github.com/cranberrygame/cordova-plugin-facebook" intelxdk:value="https://github.com/cranberrygame/cordova-plugin-facebook" >

    <intelxdk:param intelxdk:name='APP_ID' intelxdk:value='311180863621111' />

    <intelxdk:param intelxdk:name='APP_NAME' intelxdk:value='Avoid Bird' />

    </intelxdk:plugin>

    The game built successfully, but when I click the button to test publishing something to my wall, nothing happens.

    I also added using the plugin manager within xdk with the same results. I have tried prompting for post as well as publishing post, but no luck as of yet. I emailed Sang Ki so I hope i can get some direction from him.

    I use a couple other of his plugins and they work great so I hope i can resolve this one.

  • "Given URL is not permitted by the Application configuration: One or more of the given URLs is not permitted by the App's settings. It must match the Website URL or Canvas URL, or the domain must be a subdomain of one of the App's domains."

    You should fix that problem inside the facebook app, you have to change the url there, or inside the plugin?

    anyway, Intel XDK support an ajax plugin?

  • CDogs1964 Create a test app on your developer account of facebook and try with that. That worked for me. In order to make the facebook share work, you need to submit your app to the facebook to get it reviewed and approved. In the mean while, you can make the share work with the test app.

    Try it and let me know if you are able to make it work.

  • sudeep98 I have added my game to facebook and I am using my app ID and name when I add the plugin to XDK build. It used to work for me so I am not sure why I cannot get it working now. Waiting to hear back from Sang Ki. Will let you know. Thanks.

  • sudeep98 Reset everything and it seems to be working...well it is trying to work. I am getting the "Given URL is not allowed by the Application configuration..." error. I will read more on this as I see others have had the same issue.

  • CDogs1964 No, my friend. You have to set up test app within the app on your facebook developer. You created an app on the account but it's not live yet. It's still in development phase, in order to make the app work you will have to create a test app under the 'Test Apps' column of your app. Now, provide the test app ID in C2 and replace the code in Intel XDK with

    <intelxdk:plugin intelxdk:name="https://github.com/cranberrygame/cordova-plugin-facebook" intelxdk:value="https://github.com/cranberrygame/cordova-plugin-facebook" >

    <intelxdk:param intelxdk:name='APP_ID' intelxdk:value='311180863621111' />

    <intelxdk:param intelxdk:name='APP_NAME' intelxdk:value='Avoid Bird' />

    </intelxdk:plugin>

    Build the app and test it. It should work now.

  • sudeep98 Ohhhhhh!! Thanks. I will give it a try and let you know!

    Created a new Test App in FB. Updated the plugin with the new ID, name, and App secret. Saved. Exported.

    Updated my XDK. I already had it working as you showed, butt updated with new App ID and name.

    It built successfully again, but I got the same error message. "Given URL is not allowed by the application configuration: One or more of the given URLs is not allowed by the App's settings. To use this URL, you must add a valid native platform in your App's settings."

    Update 2: Added iOS as a platform and it worked. Thanks so much. On to more testing, but this is last step! thanks again sudeep98.

  • CDogs1964 I'm happy to help.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)
Similar Topics Posts Views Last Post
Unread sticky
4,517 857,605
Tinimations's avatar
Tinimations
Unread hot topic
1,069 148,756
han96's avatar
han96
Unread sticky
1,586 437,391
matriax's avatar
matriax