Messenger Connect OAuth Wrap api to get user emails - php

I want to write a php script using which i can import the address book of a user from hotmail/windows live. I am using Messenger Connect OAuth Wrap api to do that. After getting the access token, i retrieved user's contacts using http://apis.live.net/V4.1/cid-'.$uid.'/Contacts/AllContacts .. though it returns email hashes instead of email addresses. I have looked all over the documentation.. it says that using the above call it will return email hashes instead of addresses. And there is no other method mentioned there to get actual email address. Can someone please guide me in this regard?

I know its an old post but i got the solution of your problem .
I have faced same situation in the my project too.
The solution is extend the scope of your retrieving data.
https://login.live.com/oauth20_authorize.srf?client_id={APPID}&`scope=wl.signin%20wl.basic%20wl.emails%20wl.contacts_emails&response_type=code&redirect_uri=http://{REDIRECT_URI}`
Then you will get actual email.
Hope this helps someone else. :)

Related

how to send push notifications to multiple users via php

I am following this tutorial from androidhive. http://www.androidhive.info/2012/10/android-push-notifications-using-google-cloud-messaging-gcm-php-and-mysql/
Everything is working But The tutorial only shows how to send a push to ONE device at a time. I would like to send a push notification to all devices at once using the same method. I believe the way to do this is by editing the send_message.php But i'm still trying to understand how his method works.
I have tried commenting and emailing the person who wrote the article but have not gotten a response. I just need someone to point me in the right direction.
Any hints, guildance, answers, comments are much appreciated.
Now that you have successfully implemented what that tutorial teaches, the basis idea now for sending to multiple users will be something like this:
To send push notification to multiple users, you need to create an application server in PHP.Your application server will receive the registration id from the android application and will store it in a database (may be mysql).
Now when you want to send the message to the application then you write a message and fetch all the registration ids from the database which was stored earlier.
You can follow this useful tutorial to achieve exactly what you want.
The tutorial which you have mentioned was made using GCMRegistrar which is deprecated now.Instead you need to use GoogleCloudMessaging API.The link which i provided uses the new way.Hope this helps you to implement what you want.

Salesforce REST Api missing fields with PHP

I'm using the Salesforce REST API and found it very hard to find decent documentation.
I can successfully log in with OAuth and i can push new accounts to Salesforce.
I use the instance url to make the API calls and i send the following fields to create an account object:
Name
Rating
Description
The problem is that I created a free trial (which sits on na9.salesforce.com) and everything worked fine.
I created a second free trial to check if everything works with another account, but the rating field is not available... I get the following message from Salesforce:
"[{"message":"No such column 'rating' on sobject of Account"}]"
Why is that?
Also, is it possible to add notes to a created account using POST? And is it possible to create Leads instead of Accounts using the API?
Thanks in advance,
A feature called field level security (FLS) can mean that even standard fields are not accessible, check the FLS settings on account in your second org.
Docs for the REST API are on the developer force site

How the communities like facebook,orkut can able to track down our mail contact list

How few social communities can able to track down the contact lists from our mail id alone.Is there any MOU or its open for all.
Can anyone explain this.
Thanks
Lokesh.
This question deals with Facebook and GMX specifically: Importing Facebook friends with API
They shouldn't be able to track down contact information with the E-Mail address alone, though. All the services I know ask you for your user name and password to log in to the actual service.
If you're seeing contact suggestions without giving the network your E-Mail credentials, what probably happens is that they cross-reference your address against other people's contact lists.
If i am not wrong they also require password for authenticate and after they accessing their CSV contact file or some other format that has been provided by the Application

Live Messenger Connect email contacts export

Today at work I was asked to investigate a problem with contacts export from Hotmail.
It was working last month when i wrote the library. For my surprise it indeed was not working. I investigated a bit and i noticed that Microsoft has done some updates to their API. The scopes were changed ... and the permissions that comes with the scopes. Here is the line that bothered me
WL_Contacts.View -
View information about a user and the user's friends, with the exception of email addresses.
They stripped the priviledge of obtaining contacts email addresses :(
What i have to do in order to get the e-mails back so i can use my exporter again ?
Do you have problems with your contacts importers ? If not, what are you using ? Which scopes ? Are you doing separate requests for each user ?
First of all, you can find tons of information about the new Windows Live Connect API here.
Here you can find version 5 of the API documentation.
If you want to sign up and create a Application you can do that here.
I hope this is enough to get you started (unless you've already found the provided links).

How to return email address when auth an OpenID?

I'm trying to build a login form using OpenID Auth. I'm using sample code from: http://openidenabled.com/php-openid/ But I only get user's email address when auth with account on myopenid.com I want get returned email when auth link "google.com/accounts/o8/id" How can I do? Thank you very much.
There's absolutely no guarantee that a particular OpenID will be backed up by an email address.
To get that level of user data, you'll need to look into the "persona" part of the OpenID system
You must use the AX extension instead of the Simple Registration extension. You also must "require" the email attribute instead of marking it as optional.
Special requirements for Google.

Categories