I have been looking into using Facebook Connect for a new web site I am building, however the Facebook API seems to be a little flaky.
The code I have been using is basic, however the example application 'therunaround' suffers from similar issues.
For example, the friends list does not always load, and the logged-in Facebook user is not always detected.
Are these issues purely because I am just starting out?
Yes, the problems you describe are likely just due to not using the API correctly.
Facebook Connect is still very new and does suffer from occasional problems, but in general it is pretty stable and is being implemented by many major sites.
This developer post may be relevant to your problem: (From: http://www.facebook.com/developers/message.php)
Please make sure features are loaded before using Facebook Connect JS APIs
Feb 26, 2009 1:35pm
Almost all Facebook Connect's JS APIs
are loaded asynchronously after
calling FB.init(). Because of the
asynchrous nature, the JS APIs are not
necessaryly available immediately
after making these calls. You should
use FB.ensureInit or
FB.Bootstrap.requireFeatures to ensure
the JS APIs are loaded before using
them.
We have a wiki documentation that
describes this in more detail.
However, we just found out that some
Connect apps were calling Connect JS
API such as FB.Connect.* and
FB.Facebook.* immedidately after
calling FB.init. This approach would
cause intermittent failures because
the functions may not be loaded yet.
Pior to last night's push, we fixed a
bug in our FeatureLoader.js.php where
it was always automatically staring
the asynchourous loading of Connect
features. After the bugs is fixed,
code that were calling JS API before
making they are loaded are more likely
to fail. If you noticed that your
Connect apps are getting function not
defined erros for Connect JS
functions, please check your code to
make sure it is waiting for features
to loaded before using them.
Related
Looking for feedback from anyone that has implemented server-side FB pixel on SFCC since iOS 14.6
this is a big lengthy so I do apologize, but I haven't seen this issue referenced on Stack and I'm imagining the use-case is growing as companies keep migrating to SFCC.
I currently have server-side enabled out-of-the-box on SFCC for the Facebook Pixel. While it fires appropriately, I'm still seeing a handful of errors as noted below. This was a necessary step after 14.6 decimated our existing FB pixel and it has worked, for the most part, but I can't help but feel as though there's something is fundamentally broken about it.
Errors keeping me up at night:
Am I correct in ONLY using the server-side FB pixel and having the third party tracking pixel turned off?
Should I even be using the SFCC out-of-the-box server-side set-up?? Am I better off building the connector out myself via GA4?
"Server External ID Not Matching to Pixel External ID for Purchase Event"
^ this makes sense as I ONLY have the server-side running and no web pixel, but unsure why the issue is still presenting itself on the diagnostics tab.
"Server Sending Invalid Match Key Parameters for AddToCart Event"
^ FB support mentioned that this is because a parameter is missing from AddToCart, which i'm guessing is the $ total, which SFCC isn't sending OOTB.
I'm getting a bunch of external URLs in the "Recent Activities" section for the "Purchase" event, but not on the pageview or any other events. unsure what the impact is here.
The "Aggregated Event Measurement" tool shows "No Recent Activity", and FB support was not very clear on why or how this happens.
I am new to Squarespace and I was wondering if it can interact with an external Rest-API using JSON?
For example, say I have a Database being hosted privately and I want data from it to be shown via Squarespace and certain pages being restricted according to the user's privileges.
Is any of the above possible, and if so can you direct me to an example? I seem not to be able to find anything on the above via google.
Thanks
From Squarespace:
Squarespace doesn’t support server-side code, including PHP, Ruby, Ruby on Rails, and SQL.
Therefore, the only way to connect to an external API (besides those supported by Squarespace's official 'extensions') is to use "client-side" (in-browser) JavaScript.
So, the database solution which you use must be capable of securely handling client-side connections (for example, Firebase can do that). To interface with it, you must add the JavaScript to your Squarespace site via code block or code injection. An example explanation of doing that can be found at this question.
As to allowing/disallowing content based on data returned from the database, it can be done, but only client-side. That means that, while you can make the site appear to restrict access and/or make it inconvenient for others to access certain pages based on information in the database, because it is all client-side, it could technically be circumvented by someone if they are familiar with web-development, web-inspector, etc. So it's not something you'd want to do if it is critical that the content be truly restricted.
Squarespace does have its own "Members Areas" which can be used to solve content access problems. However, it's extremely limited at the moment, and there are many scenarios it does not address.
I am using OpenTokSDK for iPhone (using it Natively)
I have made the code for calling but just there is one problem.:-
I have to statically Add the SessionID. But i want to generate the ID Dynamically.
How can I do this ?
Please help!
Thanks In Advance
Full disclosure: I am a developer for TokBox.
The only safe way to get session ID and token credentials to the device is by developing an application server that suits the specific needs of your app. We have a number of server-side SDKs available on GitHub (link) that will interface with the OpenTok server API to generate this data.
Note well the server-side SDK is enough to get your credentials generated, but not all devices will be on the same session, so things like user management and application workflows are all considerations that cannot be easily written to an open source library.
That said, we did try to make some of these examples more clear by writing code examples on our blog (link). You can relieve much of the overhead of writing your own application server (no doubt a daunting task, especially the first time around) by leveraging one of the third party signaling services available, like Parse and Pusher, to name two.
Wobbals is correct, and In addition to what Wabbals has mentioned, generating sessions/tokens is very simple, the sample code required for each server language (PHP, NodeJS, C#, Ruby) is located in OpenTok's Github page.
Furthermore, if you choose not to have server side code and use Parse to handle your back-end, there is a wonderful writeup about how to use Parse's cloud code module for OpenTok to generate sessions and tokens.
Good Luck!
I strongly felt that the tokbox tutorial was quite basic but had steeper learning curve. So I ended up wrote out my own app-cum-tutorial.
Though late, I felt compelled to post here:
How To write your first iPhone Video Chat App using parse and opentok(tokbox)
I want to create an iOS App that can parse the MediaWiki API so I can display articles etc.
I found ASIHTTPRequest but the developer is no longer working on it.
What should I use instead of this?
Or what documentations should I read to get started with this topic?
If you haven't worked with writing async networking code on iOS, then I would start with the URL Loading System Programming Guide from Apple first. You can use another wrapper library like AFNetworking if you prefer another level of abstraction, though I would still suggestion learning the URL Loading System as a first step.
I have an internal tool written in java. It would be useful to get a little
feedback on how much it is used by colleagues.
A simple solution would be to have the application display an image which it fetches from
a web hit counter like application and just look at how often the image is accessed.
So what I am looking for: a stand-alone application (i.e. no Apache modules, cgi scripts, etc),
which serves one or a couple of static images and and can log accesses, preferably with as
little as possible of support of everything else.
Searching for "hit counter" gave little relevant, "lightweight http server" was more relevant, although mostly overkill still. Any suggestions?
You could try using Google Analytics. Most of the time, people using Google Analytics are tracking pageviews on a web page, and Google Provides some javascript that you can place on your page and it will track the visits to that page as well as browser capabilities/etc. Behind the scenes, that javascript is placing an image tag on the page in the manner you describe.
However, since your application is java and not a web app (I assume it's a standalone and not an applet), you won't be able to include Google's javascript (unless you embed a javascript interpreter...yick). Fortunately, it is possible to use Google's analytics without javascript.
The trick is that Google's scripts use the image http://www.google-analytics.com/__utm.gif and pass parameters via the query string. You can find a list of the parameters you can pass to the query string here. So all you'd have to do is figure out what the query string should be and have your client make the request to google's image (after setting up your google analytics account, of course).
Just use Google Analytics, it's really easy and requires a short script on your pages.
Michal Kebrt's simple UNIX HTTP server does exactly what I was looking for.