I am using php services to show message to user. It works fine but on every refresh it show 3 dialog boxes messages where I am only refreshing once.
How to prevent that, Is that php bug or android? Any idea will do thanks.
Regards,
If I understood your problem then the problem in your android code.
Can you post the code and service response sample if possible so that it would be easier to understand the problem.
Related
There is an account on the slackbot. There is a bot that sends me data every 2 minutes, in the form of text and links, after receiving this data, I need to display them on the site. Website on Html + PHP how to do this mind I will not put it. I know that somehow through Api is done, but I do not guess. Can anyone have examples? Thank you
It is very simple. Just follow one of these top tutorials: https://api.slack.com/tutorials
Also take a good look into the api documentation:
https://api.slack.com/
I've been using the Facebook php sdk to interact with facebook quite successfully. When I tried to create a photo album the code created a duplicate. At first I thought it was the php sdk (using 3.x). I tried switching to Perl with LWP::UserAgent and LWP::Simple::Post to use the http url for graph. Nothing is working. Every way I try I get double albums when I call the code. I've ensured that the code is being called once (mainly because I've created a super small test script to do it and have made outputs to ensure on the command line that it's only calling once.
Here's the url I'm using:
https://graph.facebook.com/me/albums?access_token=<access_token>&name=Test+Album+2&message=Test+Description
I've taken off the privacy setting from the url and it hasn't changed the behavior. If I run this directly in the graph explorer, it creates only one album. But any other method (yes, I am using POST and not GET and yes I've tried to pass all the params as post data individually rather than via querystring, either way results in duplicate albums) causes duplicate albums.
Has anyone experienced this? How do I fix it??? I'm at my wits end trying to figure this out.
I've tried it on multiple servers in thoughts that perhaps one of them was using a proxy causing the duplicate call, but whether I run it on my hosting service or on my localhost, I still get duplicates.
No matter what I've tried, if I am creating the album via code in PHP or Perl I get double albums created. HELP!
My first answer was deleted for some reason so I'm not sure what to do at this point. This question can't be answered because:
The issue was not with the SDK but with Facebook itself. I had created a bug report after doing some more tests. Facebook confirmed and fixed the bug. Basically, it had to do with inappropriate permissions handling.
https://developers.facebook.com/bugs/1435856773345641/
There was a bug in Facebook's handling in this instance. I'm hoping this answer doesn't get deleted because someone else may experience this and want to know that it was a bug in Facebook code, not in the PHP SDK or in the user code.
Not sure why Andrew Barber would delete that answer.
Unless someone has a better answer than what Facebook gave to me via bug report follow-up.
i am designing a project in phonegap with android. i want to make a login page. i have stored my database in mySql in XXamp. user will enter name and password validation should be done by php page. after validation on php page, php page will send feedback, according to that feedback phonegap screen message whether user is valid or unvalid. please suggest me how can i access php page from phonegap application. I need help.
Thank you in advance.
Similar questions were asked before take a look at this LINK
All your PHP code will have to reside in a remote server.
However using phonegap you can load a website that runs PHP
To get data from the server you have to use the XMLHttpRequest object or jquery's $.get() or $.post() functions.
You will get lot of examples pls google abt $.get() or $.post() functions.
i was wondering how could you implement or the logic if you like, sending the other user that the person thier chatting to is typing something, i know it something to do the chat textfield being empty or not! but i just wanted to kind of clarify! thanks
p.s. im trying to do this on an iphone app and using a php lanaguage when communicating with an api!! thanks
NSNotificationCenter should help you out on this. Read up on that and notifications. You would be able to detect keyboard events using that and hence work your logic out based on that.
Check out this question on detecting the change event for an NSTextField.
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.