Closed kopiro closed 9 years ago
I have the same issue.
Is the Facebook app installed?
I have it installed on device and the "application" on the Facebook developer page is active (read that it could have something to do with that as well).
Yes, FB installed and app right configured (without sandbox mode).
To be clear: Facebook by Facebook, Inc. https://appsto.re/il/NuV-q.i is installed?
Yes, yes :D
Please post your entire tiapp.xml here, or email it to me (mokesmokes gmail com). Also, make sure the FacebookDisplayName is exactly as you configured on Facebook app settings. Normally, getCanPresentShareDialog() returns false if the FB app is not installed, and of course then you cannot share. The Share Dialog is a FB app feature, and thus for example you can't use it on a simulator, etc.
BTW - does login work for you? What is the login method used - system dialog, Safari login, or Facebook app?
I sent an email with the entire xml.
And yes the FacebookDisplayName is the same as in Facebook settings and yeah that I know. Spent some time trying to find answers in Facebook doc's and such. Well that's the thing I use the default method to login (so app login with a fallback to webview) and I also you the requestWithGraph to get invitable friends, that all works fine. Just the share that is an issue.
@svenne87 In this particular case did the login occur via the FB app?
Yes
Le voilà:
<?xml version="1.0" encoding="UTF-8"?><ti:app xmlns:ti="http://ti.appcelerator.org">
<id>com.caffeinalab.test</id>
<name>CTA</name>
<version>1.0</version>
<publisher>not specified</publisher>
<url>http://caffeinalab.com</url>
<description>not specified</description>
<copyright>not specified</copyright>
<icon>appicon.png</icon>
<fullscreen>false</fullscreen>
<navbar-hidden>false</navbar-hidden>
<analytics>false</analytics>
<guid>75d838c0-e06a-4fe2-822d-7d55f1f9d661</guid>
<property name="ti.ui.defaultunit" type="string">dp</property>
<property name="ti.facebook.appid" type="string">531647583566753</property>
<ios>
<plist>
<dict>
<key>UISupportedInterfaceOrientations~iphone</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
</array>
<key>UISupportedInterfaceOrientations~ipad</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationPortraitUpsideDown</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>UIRequiresPersistentWiFi</key>
<false/>
<key>UIPrerenderedIcon</key>
<false/>
<key>UIStatusBarHidden</key>
<false/>
<key>UIStatusBarStyle</key>
<string>UIStatusBarStyleDefault</string>
<key>FacebookAppID</key>
<string>531647583566753</string>
<key>FacebookDisplayName</key>
<string>caffeina-test-app</string>
<key>CFBundleURLTypes</key>
<array>
<dict>
<key>CFBundleURLName</key>
<string>com.caffeinalab.test</string>
<key>CFBundleURLSchemes</key>
<array>
<string>cta</string>
<string>fb531647583566753</string>
</array>
</dict>
</array>
</dict>
</plist>
</ios>
<android xmlns:android="http://schemas.android.com/apk/res/android">
</android>
<deployment-targets>
<target device="android">false</target>
<target device="blackberry">false</target>
<target device="ipad">false</target>
<target device="iphone">true</target>
<target device="mobileweb">false</target>
<target device="tizen">false</target>
</deployment-targets>
<modules>
<module>com.facebook</module>
</modules>
<sdk-version>3.4.0.GA</sdk-version>
<plugins><plugin version="1.0">ti.alloy</plugin>
</plugins>
</ti:app>
@kopiro as @svenne87 did, can you email me screenshots of the Facebook app settings, both Basic and Advanced screens? Thanks.
One more thing:
It's fb.share({})
at least, you must pass an object, please see the README again.
http://cl.ly/image/0P3t1R160q0r http://cl.ly/image/0m3k2m0l3Y33 http://cl.ly/image/2K3d0g2f0L3F
Yes, I tried both with fb.share({ url: 'http://google.it' })
@kopiro you definitely have one issue: your FacebookDisplayName on Facebook is CTA.... please update your tiapp.xml to show CTA instead of caffeina-test-app and rebuild your app.......
<key>FacebookDisplayName</key>
<string>CTA</string>
@kopiro please update us if this fixes your problem :)
Oh, it was just a test.. initially was "CTA" but it doesn't works btw :+1:
should be closed by 3.20.02
Yees, it works!
BTW, FB.getCanPresentShareDialog()
is always false
@kopiro if FB.getCanPresentShareDialog()
were always false then the sharing would never work.
Take a look at https://github.com/mokesmokes/titanium-ios-facebook/blob/master/Classes/ComFacebookModule.m#L263 and https://github.com/mokesmokes/titanium-ios-facebook/blob/master/Classes/ComFacebookModule.m#L476
I tried on an emulator and it always returns false since no FB app installed, and on my iPhone it returns true. How can you share if it's false? The same check exists in FB.getCanPresentShareDialog()
and in the share
method
I configured the
tiapp.xml
:But
FB.getCanPresentShareDialog()
returnsfalse
.and
FB.share()
simply doesn't work.Any advice?