2014-01-13 22 views
0

我想在谷歌聯繫人中添加iPhone聯繫人。我曾使用Google聯繫API,但它給我錯誤內容不允許在序言中。 我搜索了這個錯誤,但沒有成功。內容不允許在ios中的谷歌聯繫api的序言錯誤

我可以通過網絡視圖對Google進行身份驗證並獲取訪問令牌。之後,電話API 我的請求是http://www.google.com/m8/feeds/contacts/default/full?access_token=ya29.1.AADtN_V0YDqLjA7-GmIRZN6Z_yNdfe3z-AmZMx0-ZPPyAvJFsThMaT1E5aF1Qg

請幫我關於這個問題。

method type = post 

Content type = application/atom+xml;charset=utf-8 

感謝

+0

您使用的XML或JSON – codercat

+0

我使用JSON解析器IOS –

+0

應用程序/原子+ JSON解析器其中;字符集= UTF-8試試這個 – codercat

回答

0

如果你是JSON

application/atom+json;charset=utf-8 

如果你的xml裝置試試這個

$headers = array('Content-Type: application/atom+xml; charset=utf-8', 
'Content-Length: '. strlen($xml), 
'Authorization: GoogleLogin '. trim($authToken)), 
'Connection: close'); 

For more information:

檢查你的XML文檔標籤

<!-- Correct --> 
<?xml version="1.0" encoding="utf-8"?> 
相關問題