How do i run php code in fan page? - php

Is there a way i could run php code in facebook fan page. Basically i want to show the producsts from this site:
http://ohlalashopping.co.uk/
on one of the tabs of fan page. I would love to see any possible solutions to achieve just that.
Edit:
Based on the answers provided, i just wanted to ask one more thing:
How do i add the iframe app to the fan page?

You can't execute PHP on Facebook. You can write a Facebook App or widget which accesses data from your php application. There is also a PHP Client API for Facebook which can be used to tie together Facebook and your PHP web application.

You'll need to write a Facebook application that displays products from your website, and then install that application to a tab on your fan page.
When an application is installed in a tab, Facebook will query the url you've specified in your application settings. This is different from the regular way of accessing applications in that users don't need to install the application to use it.

it is also possible you can make iframe application

Related

Is there any way to use a Joomla site into an app using PhoneGap?

I am new in PhoneGap,
I have a Joomla Site, I want to create a PhoneGap App using that Joomla site. so is this possible ? if yes than how can i implement it ?.
You can use. But you have to create web services for request and responses. Because Phonegap will not run PHP script. So you can create webservices to access Joomla functionality via JSON responses from your joomla. You can get the JSON data via jQuery in your phonegap app.
and someone said PGBuild will convert webpage into phonegap app. You can try it also.
I have succeeded creating an application as follows:
Design your Joomla page so it's responsive and renders correctly on your mobile;
Download the whole thing with wget
Edit all urls and make them point to the right (local-remote) locations.
I saved all css, images, js locally so the page would load even offline; then changed all the links so they point to the remote host;
All forms should point to the remote host;
Most modules and components were changed so after the initial display (local) they will load the updated info in the frame.
Popups won't be available, so you'll need heavy workarounds for facebook integration etc.
Also, if you plan to use any phonegap features, they will only be available if you load the library inside your downloaded page; this will force you to change all calls to ajax (no document.location.href calls are possible since you'll lose the phonegap javascript).
The first time you load the page from the server it will take forever to load. Ensure you have proper caching set up otherwise you'll just lose your customers.
My advice is to start with an ajax project at the very beginning, it will save you lots of headaches.
Keep in mind, if you plan to use iframes, forget it. They work lousily on iphones, and debugging is nearly impossible. Simply take your time to plan a real phone app in javascript & using Ajax for the calls.
You don't need any webservices in Joomla for loading content, simply use:
&tmpl=component
when you need the content of a module.
Additionally, for blogs and lists, Joomla makes RSS feeds available so you shouldn't need too much coding to achieve this.
I have limited myself to ajaxifying the modules, which makes caching more efficient on the server and the interfaces appear more dynamic.

How to get streaming home timeline from Twitter in PHP?

How do I display my own streaming Twitter home timeline with PHP? So that the connection remains open indefinitely?
I have a Twitter application and all the required keys and tokens.
I've been going over the Twitter documentation and playing around with several PHP libraries, but to no avail. I haven't found anything like a step-by-step tutorial, either.
Thanks!
Twitter provides a useful widget for this (displayed as an iFrame on your website)
log into twitter(in your web browser), Click the gear>settings>widgets then you can configure it to search for #yourtwitterhandle or #yourhashtag or both.

IOS HTML5 app Facebook Login failure when 'Add to Home' screen used

I have been working on a website that has a mobile version. Integrated into the site is a bit of code that allows users with FB to register without having to fill out a form. If the user meets any of the following conditions all is well
Uses ANY desktop browser
Users ANY mobile browser
The FB just works. However as soon as I do an 'Add to Homescreen' with IOS to make the app look and perform like a native app, when anyone uses the FB signup I get the
'Given URL is not permitted by the application configuration: One or more of the given URL's is not allowed by the Apps settings. It must match the Website URL or the Canvas URL, or the domain must be a subdomain of one of the App domains'
I am assuming that once you use the add to home screen, and the app gets its own instanced browser, the URL changes, likely some form of localhost derivation maybe?
I can't find any definitive answers to fixing this, and was wondering if anyone else had experienced this HTML5 IOS app problem?
Looks like the dev of the extension I was using will be working on a different authentication flow, so not giving this any more dev time

printing a web page after loading?

I'm using php & MySQL to develop my web based HRM system. Iam genarating leave report then i need to get printout automatically after loading full report (without opening print dialog box .)
this is possible or not?
thanks;
I am sorry to say that this is not possible within the context of a web page. If you design a (browser) plugin, then you can use the plugin to do so, but all users would need to install this plugin for it to work.

Opening an iphone app from PHP/Javascript coded website/page

My question is pretty simple actually... I wish to know if, and how, it is possible to check for the existence of an application on an iphone (twitter app for example) and then pop it open via PHP and/or javascript.
The process would go as follows:
User scans a QR code with his Iphone that links to the page
On the page, php or javascript does some magic to check if, and what, twitter applications exist.
The page then sends a custom URL scheme to open up the desired app (twitter:// for example).
Is this possible? Are there any examples of source code that display javascript/php doing this from within the context of an iphone?
Thank you for any help. :)
It would be imposible to check for the existence of an app from Safari.
You may launch an app using a link if the app has registered a protocol. For example, to launch the Facebook app and open it on the user profile you may link to fb://profile.
Here I found a list of some other iPhone apps protocols:
http://wiki.akosma.com/IPhone_URL_Schemes

Categories