I want to build a PHP page and ask people to share my link through WhatsApp.
If user clicks my link through whatsapp, they will be able to see the page content.
If user clicks my link through LINE or Facebook Messenger or something else, they won't be able to see the page content.
Is it possible to do that?
It's quite tricky ! I did in my whatsapp bot application. ! It's quite tough but still one hope ! You can find whatsapp server ip from the android application code. 1st off all decode the whatsapp android application (current version) using dex2jar and apktool. (apktool is not necessary). dex2jar will produce the .jar file of application. Open jar file by any jar-viewers and find server details in the code. (Lengthy Process)
After knowing that just create a function in your php script to get redirected URL details. either using curl or header.
Note: I didn't test it on iPhone / BB / Symbian devices. I am not sure about the efficiency of this trick ! You can give a try !
Related
How do you retrieve the username of someone on Youtube who is using your application with PHP? I'd prefer to do this without the API but if needs be point me in the right direction because i don't know what to download , I've visited the google developers site / place already.
I found some code from 2009 but it was to retrieve usernames from a youtube video and it didn't work. I tried reading the contents of page with the fopen() and file_get_contents() but it always appears as if I'm not signed in whereas I am signed in via FireFox.
Don't know if this makes a difference but I was running this on EasyPHP via localhost
Thanks
You can't, by design. You do not have their session cookie server-side where you're using fread. Youtube determines whether you are or are not signed in based on that session cookie, and you do not have one on your server.
If you want their YouTube user name, use a client-side API in JavaScript or simply ask them for it with a text input field. It is impossible to find it server-side, as it should be. Your server has no business finding out my Youtube username without my express permission and interaction.
I've built a little mobile web app for the town I live in which aggregates a lot of info and makes it readable. Lately, on my android phone browser, when I go to a certain page it asks me do I want to open it with Browser or MX Android Player. I've looked at the request headers in Chrome and I can't find anything wrong with it. I've had someone test this on an iphone and the issue doesn't happen. Any ideas?
The site in question is http://sligo.me
The page throwing errors is http://sligo.me/Events.
This has nothing to do with your page. It rather has something to do with MX Android Player. Android allows its app to register for URLs to be handled through them. In this way if Chrome is installed on a phone and the user clicks on an URL the system will ask if it should use Chrome or Browser to open the URL. The user can now select a default app or make the choice every time she clicks on a URL.
An app can also register for some URL parts only. A good Twitter app would register for all URLs with the host Twitter and then display the content of that page inside the app.
I guess that MX Android Player registered for some URLs and the http://sligo.me/Events matches that filter. You could experiment a little bit and try to change the URL part that the filter matches. More information about this filtering can be found in the Documentation about Intents and Intentfilters
I have a webpage (shown in an iOS UIWebView, but that doen't really matter) that shows, among other things, the users high score.
I want to add a button that the user can push to share his high score (in the HTML via PHP) on Facebook; when the user presses the button, a pre-programmed message gets posted on their wall: "Look, my high-score on awesomeiPhoneGame is 523, Check it out ".
I would prefer to do this entirely in HTML instead of native iOS code, for several reasons. What's the easiest way to do this?
Try to look up at Facebook javascript SDK that mean FB.ui
and don't forget to show window that prompt the user to grant permissions to your application
(see also : OAuth Dialog)
I'm currently working my way through the facebook-iphone-sdk and the MGTwitterEngine and I'm wondering why this all has to be so hard.
I'm not planning to access any data from the two social networks, just allow the users of my app to post a message as their status/update.
Now after I installed the facebook-iphone-sdk I realized they just send you to safari to authenticate at facebook and then back into your app.
Now this seems overly complicated for the users of my app, if they just want to post they don't have to go back.
Isn't there a way, I could just call something like
http://api.twitter.com/version/statuses/update?text="this is the new status text"
?
EDIT:
The first answer
http://twitter.com/home?status=[URL ENCODED TWEET].
is exactly what I need.
Unfortunately this works perfectly on the Laptop, though if you are not already logged in on the iPhone, you will be presented with a a screen where one has to press "login" once. (at the url "mobile.twitter.com/home?status=[]").
Pressing login there links you to "mobile.twitter.com/session/new" without the status argument and so once you are authenticated the status message is lost.
The URL you're looking for is:
http://twitter.com/home?status=[URL ENCODED TWEET].
This will open up a window of twitter and, if logged in, populate that tweet into the Tweet box.
For Facebook Share, the URL is
http://www.facebook.com/share.php?u=http://SHAREURLGOESHERE
There is lots of sample code that comes with the facebook-iphone-SDK. If you were to allow the user to pubish without authorizing it chances are apple would deny it.
I am developing an iPhone app, which now can update Twitter account with GPS coordinates in real-time, by the Twitter API link: http://username:password#twitter.com/statuses/update.xml , and I am looking at how to make my own database to accept updates from iPhone, via a similar API page.
It seems a .php page can serve as the API, and MySQL can serve as the database.
What are the good ways of doing it? Any template code and tutorial please?
Try one of these:
http://www.webresourcesdepot.com/how-to-create-an-api-10-tutorials/
Thanks for the answer. I found the php page just need code like
$userid=$_POST["userid"];
$companyid=$_POST["companyid"];
$phoneid=$_POST["phoneid"];
to receive POST from the iphone app.