I'm working on integrating gmail into an in house application so on a users dashboard they see the 10 newest emails with in their gmail account. I'm pulling in the emails using fsockopen and issue imap commands.
I've gotten the url to direct link to the message that looks something like this: https://mail.google.com/mail/u/0/#inbox/13e2b4235af0b71a
However in a pop up that still contains all of gmails regular interface. What I'd like to be able to do is from the link in our system pop up the gmail pop up version (if you click the "in new window" button within gmail). See below for the gmail pop up I'd like to direct link to.
edit: For those wondering. No grabbing the url from the bar and changing the thread id (th=) doesn't work.
Building it like this makes the application very dependent of Google. If they decide to work something else out as it works faster you need to rethink your hack.
I'd strongly recommend to use a more Generic approach.
Either using the GMAiL API: https://developers.google.com/google-apps/gmail/
Or using SMTP/IMAP/POP commands to the GMail server.
Good Luck!
Related
I have built a simple webpage in PHP. I want to tell if users like my page (I placed a like button on it). It is not a Facebook app. I have seen this, but don't know how to use it with PHP. I don't know JavaScript at all. I tried pasting the code listed at the link into my page, but it didn't do anything useful.
A PHP solution would be preferable. I don't want to build a Facebook app, I just want to know if the Like button has been pressed.
Any help would be appreciated. Thanks!
Edit: Here's the link to my website, per answerer request: testingground.comyr.com
Those Edge events are only usable to detect if the user clicked the Like Button right now, but you cannot check if he already liked your page. That is only possible with an App, and user authorization with the "user_likes" permission.
More information:
Check if logged in user has liked my Facebook Page
Check if user liked page or not
Why don't you use the Facebook developer reference documentation?
Without an API Access, I think there is no possibility to do that.
How should you have access the private token what a random user liked?
The tag mailto: in a link opens the default email client. However, many of the people I want to code for use GMail.
So, is there a way to craft an email and access the user's gmail tab so that the all she/he has to do is to click send?
I am afraid that there isn't such way. It's not something that you should be attempting to solve in your web application because user agents might behave differently. So just leave it that way.
Use the anchor like that:
"Crafting an email and access the user's gmail tab" = XSS which is unethical.
One way to achieve what you want is to ask your users to make their Gmail handle mailto: links by following this guide -> https://support.google.com/mail/answer/10966?hl=en
No such way to set it from inside your applications. But gmail does provide you setting to open mailto links in gmail.
A client of mine (a design studio) asked me to style the like-box social plugin on their site.
As far as I know this cannot be done now with the deprecation of "css" parameter on the fbml tag.
So the route I have to take is to recreate the like-box myself using the js SDK (or php SDK), but the problem is that I cannot find the users (and their photos) that like my page. I'm searching through the opengraph explorers parameters but i cannot find anything.
Does anyone know which url I must follow in the graph api to get what I want?
Do I have to have an access token for such an action? I noticed that the likebox plugin works event if you don't have a facebook account (It shows pictures).
Thank you.
You can't recreate the like box on your own. The Facebook APIs will not return a list of users who like your object. This was done to stop people from getting user lists of likers and spamming them.
Currently, you can only query to find if a specific, authenticated user or which of their friends likes your object.
You could build something similar by populating your fake like box with images of recent posters. You would need to deal with filtering out duplicates, and the page posting as itself, but this should get you started: /PAGE_ID/feed?fields=from.name,from.picture&limit=10
You will need an access_token to get this data. I'd authenticate as an app to do it.
I'm trying to create a chat system using PHP and javascript. I want to know how the chat in Gmail works: it will remain in the same position even as the user moves to another page. I would be grateful if anyone could explain how it works.
And at the same time, please give some ideas on how to create a chat s/m. For example, the creation of the popup window, protocols to be used with chat, etc.
The chats in GMail, Facebook or Orkut stay at their same position even when you change pages thats because they are not doing a real page change when you click on any link inside GMail or Facebook or orkut. They load the page by means of a hash tag identifier and load the contents using standard AJAX. For example inside GMail you would find all links like inbox as https://mail.google.com/mail/?zx=xxxxxxx&shva=1#inbox and https://mail.google.com/mail/?zx=xxxxxxxx&shva=1#starred so when you click on them the browser doesn't actually reload a new page instead makes an AJAX request and pulls data in, hence this doesn't affect the chat block on the page.
You can have a look at http://www.ajaxprojects.com/ajax/tutorialdetails.php?itemid=9#start for a simple PHP/MySQL based chat application. If you want a scalable chat application you have to go in Comet or "Bidirectional-streams Over Synchronous HTTP" BOSH. Friendfeeds TornadoWeb in python can help. http://www.tornadoweb.org/
Hope this info helps.
I understand that you want to create a "Chat system",
Gmail's chat is not an isolated system, it is closely integrated/Synced with Gtalk ,
(do you plan on providing a Desktop app as well as a web interface?)
Secondly Gtalk/Gmail chat uses a custom protocol(although it is open..meaning you can write your own Gtalk clients as well).
For your "Chat System", if you want it to be as nice as Gmail's you'll definitely need to use
AJAX and JSON along with Java Script and PHP
AJAX will help you to create Eye Catching at the same time responsive UI and and JSON will help you to transport data along the wire.
I want to know whether or not I have a new email from Gmail, but I don't want to go to Gmail all the time.
Is it possible to use javascript to check if a new message has arrived?
I know it is possible using php classes, but I would like to do it javascript also.
I guess the first assumption should be the Gmail user should have got logged in to Gmail Website in the same browser and without any restarts of the machine, in other words gmail cookie should be alive and should say gmail that who is the logged in user.
Then you may write javascript to load http://mail.google.com in some hidden iframe and take it's document handle to explore the DOM of that page and find out any bold row in inbox table (this is very simple in saying but definately be complex in doing)
Nah, don't think so. Keeping in mind that the only way to do something like that would be AJAX-related => no possibility to access other sites but same as the JS on which the page resides on.
Yes and No. You can't do it with Javascript alone, but you can do it with Javascript if you can write some sort of proxy script to log into gmail and check for you - and then return that data in text/json/php/whatever...