Please read the question carefully before you answer as it is a bit confusing.
I recently saw that Pagemodo gives the option to have multiple tabs on a single page as many times as you want which they call as "UNLIMITED TABS" in their plan options. So this means that if we want multiple welcome tabs on a page that can be done. Technically you can create only one page tab with one application. To have multiple tabs you will need multiple apps.
Now the question is how is it possible?
Even if i have multiple apps, while showing the page tab i can fetch the data about the tab from a db using "page id" as this is the only thing i have in the signed request. How do they get to know which page it is (ok we can get it from signed request) and which app it is out of those multiple apps that were created so that they render data accordingly?
Be careful your not falling for marketing speak.
Pagemodo likely manages a defined number of apps (which may be a very large number) and is allowing you to install them onto any page you manage giving you in essence unlimited uses.
The backend is all managed via end points for each of the apps and the signed request.
I found how it may be possible.
This is a nice place to get an idea of the problem i came up with:
http://forum.developers.facebook.net/viewtopic.php?id=90792
After thinking about it i came up with the following solution that though you do not have a way to get the application id till you are not authenticated using signed request or any other data provided by facebook. But you can still get it via the page tab url.
So if i have an app with tab url as: http://www.example.com/tab.php, we can pass the app id via http://www.example.com/tab.php?id=APPID
Solves the purpose pretty well.
Related
I have written a PHP based blog for the company i work for. Not using any frameworks. I am having trouble tracking users who come from my facebook page's posts to my blog (not wordpress).
I have created a shortlink url. Let's say it is sample.co and it redirects traffic to sample.com. Everything seems fine until here. The problem starts here.
I am adding all user's ip's, user agents. But if even i get 500 visits, my code adds somethig like 3.000 visits. Facebook stats and Analytics shows similar stats (~500 visits). I see that ip's added to MySQL are all different. It usually happens with Android users. I have read somewhere that Facebook sometimes renders to their users the actual URL when FB shows the post. I mean instead of the widget, Facebook shows the whole page. I am not quite sure about that to be honest.
To solve this problem, I have created and added an jquery script to my page and listened users' scroll event. It worked great. Not seeing too much traffic. But this time the problem is i am counting less users. Even I get 500 users from facebook and Analytics shows similar results, my script adds only 200-300 to MySQL.
Does anyone know a better way to track real traffic? Or do you aware of such problem?
Thanks
It should be filtered on the basis of user agent.
https://developers.facebook.com/docs/sharing/webmasters/crawler
how to detect search engine bots with php?
Identifying users through IP is a good idea, but if your IP keeps changing, it's a good idea to use cookies.
http://php.net/manual/en/function.uniqid.php
If the cookie does not exist, you should see it as a new user.
I have found the answer. The problem is called preview (prefetch). Here is the link:
https://www.facebook.com/business/help/1514372351922333
Simply, facebook preloads everything when FB shows the thumbnail to the visitor to speed up your page's load speed. They send X-Purpose: preview header. So you can simply check if HTTP_X_PURPOSE header's value is preview or not. If so, do not count it as a visitor.!
Here are more detailed descriptions:
http://inchoo.net/dev-talk/mitigating-facebook-x-fb-http-engine-liger/
http://inchoo.net/dev-talk/magento-website-hammering-facebook-liger/
I'm building a product that involves clients adding their FB app data into my product's dashboard.
In this case each client would have to go to developers.facebook.com/apps and create an app first.
I would want to have a button which says "Create App" in my website that when clicked, would create the app instantly for the client.
So is it possible to create a FB App from my website (with script, not manually) ??
Thanks in advance,
Altin.
It was possible couple of years ago, and now it's been removed.
First of all, I’d think about the question, “does every client really need their own app?”
Maybe it’d also be possible to have all of the stuff you’re planning to do (no details on that) under one app, and have it decide on what data to show based on the fact which client’s Facebook page it gets added to (if it’ll run as page tab app), or by some additional parameter passed to it when calling it. You could f.e. example automatically redirect to a sub-folder on your webspace based on this criteria, that displays individual pages for that client.
If that’s not an option, then yes, your clients will have to set up the basic app themselves (and therefor they’ll need a verified account) – and afterwards tell app id and secret to you. Many of the “advanced” app settings can then be set by you via script – look at what properties are marked as “(Editable via API)” here: https://developers.facebook.com/docs/reference/api/application/
(Although some of the basic settings, like category, description, logo etc. will still have to be set by your client themselves. But other, more “technical” stuff, that the client maybe doesn’t know about and doesn’t even want to be bothered with, like canvas/page tab URLs etc. can be set by you. I’d say that’s as good a compromise as you can get for such a scenario.)
I was wondering if it was possible to have two or more sets of Google Analytics tracking codes on one page. There's going to be a single webpage that is accessible through either normal methods (desktop or mobile browser), or accessed through scanning the QR code on the product packaging and being redirected that way.
The client wants three things tracked:
Analytics for the full page (all methods of connection)
Analytics for just those connected via normal methods
Analytics for those connected via QR code
I have already developed a means of differentiating the connection method, and switching the Google provided Javascript for 2 and 3.
So is this possible, to have two analytics codes on one page? I have checked all over, can't find an answer that is to the point.
Thanks in advance
A single analytics will report browser and OS used and the origin of traffic. Hence, there's no reason to use three cookies, three JS files when you can just generate a personalized report with the data you need
Don't use different trackers for this, use custom variables. Splitting it up loses you valuable insight into how different use cases navigate the site.
If anyone is ever looking for this:
http://www.publicinsite.com/qr-codes-google-analytics-track-mobile-devices/
That;s the best bet I think
I have an app that creates dynamic pages for users with like buttons.
The button works on all of the pages, but when I refresh the pages some of them don't "remember" the like count (or that I liked the page a second ago), while others work perfectly.
Here's an example of a page that remembers the like count: www.teespring.com/teespring
And one that doesn't work: www.teespring.com/brownrugby
The problem lies the value of the meta tag fb:admin. Here is what you have published -
"102628019845885" is not a valid Facebook user id. Please correct it and your users would be able to "Like" your page.
Well, you can debug such issues yourself, just go to Facebook tool - http://developers.facebook.com/tools/debug
I figured it out earlier today after spending few hours while debugging a similar issue for my app http://www.jokeshive.com
If you monitor your network traffic while you click the like button, you can an XHR request to Facebook to create the Like for the user.
You will see when you click the like button, Facebook makes this request, and returns a JSON string with the status. Yours actually fails and here's the relevant part of the returned response.
"payload":{"requires_login":false,
"error_info":{"brief":"App ID does not match domain",
"full":"The app ID specified within the \"fb:app_id\" meta tag is
not allowed on this domain. You must setup the Connect Base Domains
for your app to be a prefix of http:\/\/teespring.com\/brownrugby.","errorUri":"\/connect\/connect_to_node_error.php?
title=App+ID+does+not+match+domain&body=The+app+ID+specified+within+the+\u002522fb\u00253Aapp_id\u002522+meta+tag+is+not+allowed+on+this+domain.+You+must+setup+the+Connect+Base+Domains+for+your+app+to+be+a+prefix+of+http\u00253A\u00252F\u00252Fteespring.com\u00252Fbrownrugby.&hash=AQAacTBYi-g6Czel"},
From this response, it seems like there's an issue with the domain configuration of your application, or the app id configuration of your open graph object pages.
Hopefully this helps and points you in the right direction.
I had a potential client ask me if I can prevent a user navigating away from their website within an iPad app? So I would need to load the client site within a web view and somehow disable invalid links i.e. banners and promotional links.
I am wondering if there is a way to catch the link that has been touched within the view before it is loaded.
If there is no way to do this, is there away to strip a web page of invalid links before it is loaded into the web view?
Use UIWebViewDelegate method webView:shouldStartLoadWithRequest:navigationType:. It's called when user taps a link. Return NO if you don't want to handle any links or YES if you want your web view to handle the request. More info in Apple docs.
A nice thing is to filter out some requests and handle them yourself based on e.g. URL-scheme of the request or based on UIWebViewNavigationType value. Note: for a filtered requests that you handle, you still return NO.