I have uploaded my .zip file of my game to Facebook Instant Games when an error pop up. It says "Game must reference to one of our supported SDKs via CDN."
I already put the script tag in head and body
<script src="https://connect.facebook.com/en_US/fbinstant.7.0.js"></script>
and my fbapp-config.json
{
"instant_games": {
"platform_version": "RICH_GAMEPLAY",
"orientation": "PORTRAIT",
"navigation_menu_version": "NAV_BAR"
}
}
I also tried the CLI method in uploading the .zip file, but also gets the same error saying I must refer to their SDK via CDN.
Can anyone please guide me.
Can you try this script tag instead?
<script src="https://connect.facebook.net/en_US/fbinstant.latest.js"></script>
This worked for me when I just tried uploading a .zip file now.
Try to change the SDK URL to the following:
https://www.facebook.com/assets.php/en_US/fbinstant.latest.js
This works for me.
I found it in a sample file, I have just downloaded from facebook.
I hope it helps!
Related
Just over a year ago I created a chatbot using IBM Watson Assistant. It is successfully interfacing with wordpress and facebook. it was working perfectly well in a web page too, but has now stopped outputting any text. I created the website integration by copying the code shown in the "preview link" page created by IBM when the bot is under development. That code includes a library file called "chat.0.0.4.js" and corresponding css. When the code runs now, the chatbot renders correctly, but when I look at the browser console I see at line 12990 in chat.0.0.4.js:
400 - {"error":"Invalid Request Body","errors":[{"message":"When source.type is not 'watson', source.id is required
Does anyone know how to fix this? I see that the integration code from the "preview link" is now totally different and I wonder if the mechanism I used a year ago is now depreciated?
Thanks.
I think you need to use the newer version, the script to integrate WA has changed and now looks like this:
<script>
window.watsonAssistantChatOptions = {
integrationID: 'YOUR_INTEGRATION_ID',
region: 'YOUR_REGION',
serviceInstanceID: 'YOUR_SERVICE_INSTANCE',
onLoad: function(instance) {
instance.updateUserID(L12345);
instance.render();
}
};
setTimeout(function(){
const t=document.createElement('script');
t.src="https://web-chat.global.assistant.watson.appdomain.cloud/loadWatsonAssistantChat.js";
document.head.appendChild(t);
});
</script>
I am having a problem getting Facebook events in the Facebook app. For example, to open an event with the url "https://www.facebook.com/events/1743847059178738/," I would use the following code:
let facebookURL = NSURL(string: "fb://event/1743847059178738")!
if UIApplication.sharedApplication().canOpenURL(facebookURL) {
UIApplication.sharedApplication().openURL(facebookURL)
} else {
UIApplication.sharedApplication().openURL(NSURL(string: "https://www.facebook.com/events/1743847059178738")!)
}
}
It will open the Facebook app, but no matter what event I attempt to display I get a screen saying "Unable to load event. It may have been cancelled." I have tried substituting the Facebook URL of an event for that of a profile (e.g., string: "fb://profile/100005906912309") and it works just fine. Am I mistaken in assuming that the numbers at the end of the event's URL are the same as the event's numeric ID?
So I figured out that I could bypass the whole "fb://event..." bit and just go with:
UIApplication.sharedApplication().openURL(NSURL(string: "https://www.facebook.com/events/1743847059178738")!)
I assumed this would open the link in Safari, but it automatically opened in Facebook in iOS 8.
I'm sorry for the late answer. I'd prefer to write this as comment, but I'm not able to.
First, nice work around. I think it is a perfect fallback if the fb:// scheme fails as it shown in code shared with your question. I've spent a lot of time trying to resolve the same issue. What I've found is that fb://event/{event-id} is no longer supported and it was replaced with fb://event?id={event-id}.
I've used this post as a reference.
I am having a issue with facebook login. I am using facebook sdk 4.3.6 and unity3d 4.3.0/4.3.1.
when I hit login button Facebook permission windows open and after pressing ok nothing happens and following message is printed in logs
" sending to Unity OnLoginComplete({"cancelled":true,"key_hash":"asdasd"}) "
FB.Login("email,publish_actions", LoginCallback);
and in
void LoginCallback(FBResult result)
{
login = result.Text; // output login=false, userid="", access_Token=""
}
Not sure what the above answer is...Why does JSON have to do with anything?
I am having the same problem...was using Facebook SDK 4.3.4 and was having the same problem.
I saw there was a new one up 4.3.6 and tried it...same problem.
I check LOGCAT and saw the same line:
sending to Unity OnLoginComplete({"cancelled":true,"key_hash":"4EbLC........0uFU1A="})
Which is NOT my has from my UNITY Facebook settings...I have no idea where it is getting this HASH from.
I am wondering if the "cancelled":true result is a result from the Facebook Dialog to allow permissions ..although I did not click CANCEL
I am going to try the only thing I haven't tried yet and that was a post from someone to get the latest OPENSLL and regen the keys...
SOLVED: OK Here is what I did to get it working....
I added that Hash that I got from the LOGCAT to the Facebook Develop App Settings on
develop.facebook.com/apps
Now it logs in me in...
I just don't know where that Hash is coming from...I also have the hash that was generated from Unity in there as well.
Ryan
I'm using Phonegap for Android and I have just integrated Facebook plugin(https://github.com/phonegap/phonegap-facebook-plugin) to my project. I need to get an AccessToken that could be sent to server so that server could post on user's behalf.
When I at first called FB.login(callback, {scope:'email,user_birthday,user_location'}) everything works fine and dandy. But if I add 'publish_stream' permission to the scope I get an error: "Uncaught Error: Error calling method on NPObject". Error is originating from cordova.js (phonegap 2.8) on line 863 which is:
var messages = nativeApiProvider.get().exec(service, action, callbackId, argsJson);
I initialize the plugin in the next manner:
FB.init({
appId: Global.Facebook.apiKey,
nativeInterface: CDV.FB,
useCachedDialogs: false,
});
If I remove that permission from scope all works ok. Perhaps anyone has some experience or thoughts on how to fix such issue? I debug my app on my phone (Samsung Galaxy S2 connected via USB debugging feature) and for IDE I use adt-bundle's Android Developer Tools (basicly eclipse);
Many thanks in advance.
I seem to have gotten to the root of the problem. When logging in initially, I can't ask for write ("publish") permissions. As I understand I must ask them later after initial login. Which is abit uncomfortable for me, since I might have to prompt user for permissions several times during a single use-case which is bad. Perhaps I am missing some documentation page where all that stuff is already mentioned?
I've founded !!
Go to FacebookSDK Project -> Properties -> Java Build Path -> Order and Export (tab) -> Make sure android-support-v4.jar is checked. Then do a clean and launch...
Great ?
Use this in your session for publish and read permissions (extended permission.)
session.reauthorizeForPublish
I am new to phonegap and iPhone development, and am trying to get phonegap's index.html to redirect to a JQuery Mobile site that is located externally at a settings based URL which I have in my Settings.bundle, Root.plist, Server URL. I have my index.html page redirecting to a hard coded server in the index.html file, but how do I get it to go to the URL that I have in my application settings?
Thanks in advance for any help in steering me in the right direction
I've been trying to get the plugin applicationPreferences working to essentially do something similar. Currently to no avail. As soon as I come up with a solution I will post something here again.
UPDATE
This does work it seems. There is a small, nearly unnoticeable error in the readme example.
There needs to be a comma after the 'homer'.
¬
window.plugins.applicationPreferences.set('name_identifier','homer', function() {
alert("It is saved");
}, function(error) {
alert("Failed to retrieve a setting: " + error);
}
);