I'm absolutely new to coding and am trying to add a like gate to my Facebook app (a simply blog feed created using a wordpress plugin)
I really want to make a like gate for the app... ideally it would be an ajax style popup that greys out the content until the page is liked, or a transparent graphic which does the same.
Does anyone have any idea on how to do this? I'm completely stuck!
Like-Gates are usually in App Tabs, where it's possible to check if the user liked the page without forcing the user to authorize your app first. So your first step is to research how to use signed_request to determine if the page has been liked. If the page isn't liked, show the ajax popup. For the 'ajax-style-popup' you can use something like leanModal
Related
Let's see if I can explain this and make sense at the same time...
I've a website and a mobile app for that website. In some cases I'll use the view on the website in the app. I wont redirect the user to the website, but the website view will display in the application. But in this view I'll also make some changes. Lika media queries but at the same time not, because it the user is using a mobile but not the app, a the website will show as normal, but responsive of course.
UPDATE (trying to explain a bit better)
If you use the mobile app, only a specific part of the website will be shown. In this case it will be product categories. Header, footer and all the other content will be gone except for the product categories. If you use the mobile and for example safari, the header, footer and all that stuff will be shown.
So the question here is how can I check, with using PHP, if the user is coming from a mobile app and thereafter display a certain view?
You could have the mobile application open up the website with a GET variable set. Example would be the mobile app would open up www.myWebsite.com?source=mobile.
This way when the php is run on the page you can have something like:
if ((isset($_GET['source'])) && ($_GET['source'] == 'mobile'))
{
//This is a mobile view!
}
A downfall to this would be that anyone could just type ?source=mobile to trick the browser into thinking it's coming from the app.
If you use third party mobile application you can try figure out the source of the request by HTTP User-Agent. Usually issues about views solving by CSS with #media rules.
I hope I got your problem.
You can check by user agents. Using _SERVER['HTTP_USER_AGENT'];
Or else you can use 3rd party libraries like
http://mobiledetect.net or you can use bootstrap library for do that.
If you want to do different design for mobile and desktop then I prefer to you to use bootstrap library.
What I'm trying to accomplish seems like it should be pretty simple...
I have a gallery of 10-20 photos in a grid, all on a single PHP page.
I want a Facebook "Like" button below each photo. When the "Like" is shared on the user's profile (if they choose), I want it to show the photo they liked, but link to the page with the gallery.
A wireframe image of what I'm trying to accomplish is here: http://i.stack.imgur.com/u3h0E.png
Right now, I'm simply using a simple Facebook Like Button, but I want to tie each Like Button to the respective photo, yet have it all tied back to this gallery page.
Any help or direction is appreciated! Would certainly prefer to stay away from setting up anything complicated with the Graph API, but if that's the only method, let me know!
One quick solution would be to have each photo in the gallery (and its respective like button) render within its own IFRAME. As far as the photo display and LIKE button are concerned, they live in a separate context (and URI). You could then redirect any requests to that URI that don't originate from an AJAX request (i.e. whenever someone tries to access the content that has been "Liked") to the gallery page. This has the added advantage that you can (as your app evolves) use AJAX calls to substitute out and load in new photos, in place of the old ones, with minimal effort (that's a tangent though).
As I come to the end of my project I am starting to wonder if I made it too dynamic. I have designed this social networking site and 90% of it is based on JQuery. It looks nice, it loads fast but I started to wonder if it is too dynamic...
My concern is that basically once you log in, 95% of what you do is JQuery based therefore the user never leaves the same URL. If this is true, how is a search engine like Google supposed to index my website?
Is this the part where I ask myself what parts of the site I want to be indexed and make them static pages instead?
Basically it has occurred to me that if when you browse my site for user profiles, these profiles are displayed to you through JQuery requests, then it is safe to assume that these profiles can never be found in a Google search, because the Google spider would never see it. Is this true?
Thank you for any thoughts on this,
Vini
Make your site work in both "modes". For example, I'm on my dashboard and I want to check out my friend Joe's profile, there should just be an A tag with the href set to something like "/profiles/joe".
Now, onDomReady, when the page loads, run your javascript to go through the links and attach click handers to those links, and load the profile dynamically using your existing jQuery style.
This development style is called "progressive enhancement" and allows both search engines and human accessibility devices to work better with your website. Check it out.
I have a website where i implement a wall of messages, the idea is to add to each of this wall messages a like button, where clicking on it would immediately post on the user's facebook profile page that he likes THAT SPECIFIC COMMENT.
Is this possible? I just enter this new world of facebook php developers, and as far as I have read here it always talks about adding a Like button for a specific URL. I would like to make the like button apply for the specific post within the messages wall.
I am clueless as where to start, if by the way any one could recommend a detailed tutorial on how to integrate a website to facebook in its different ways, i would really appreciate it.
EDIT:
Looking into #Kaan Soral suggestion of using open graph, I think it is important to add that I dont want each wall post that the user likes to appear in the "Likes and Interests" section of his profile... This wouldn't make sense because he would rapidly have loads of likes of separate wall posts.
Its possible, read this: http://developers.facebook.com/docs/opengraph/
You have to create a URL for every item that will be liked and on that URL there should be META tags for descriptions, image etc
i need to use share button in my website. Different share button for different products.. mostly we need to use like this,
http://www.facebook.com/sharer.php?
In the above url what are all the parameters we need to pass for showing it as our website, product and some image of that product in that share page...
You asked what parameters you need to pass it to have it show up as your site, etc. The like button uses its own Graph Protocol API to do this, it essentially makes your page a facebook page and can be read as such. It's written like XML and defines things such as the thumbnail you want to show as your picture, the shortname of the site, etc. Go to developers.facebook.com to read all about the facebook API and app development and integrating into your webpage, etc.
you cand use this on github to share content on social media (includes facebook) and make your custom button!
You can use Facebook Like also. It performs the same as the Facebook share now appearing in your Facebook newsfeed with thumbnail, or
You can use some plugins like add this or you can use the following link:
<a name="fb_share" type="button" href="http://www.facebook.com/sharer.php">Share</a><script src="http://static.ak.fbcdn.net/connect.php/js/FB.Share" type="text/javascript"></script>