从gmail导入联系人 [英] Import contact from gmail

查看:474
本文介绍了从gmail导入联系人的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨专家,

i希望在gmail中导入联系人我正在使用

hi experts,
i want to import contact in gmail i am using

using Google.GData.Contacts;
using Google.GData.Client;
using Google.GData.Extensions;
using Google.Contacts;



API。但是它给了例外



我的代码是


API. but it give exception

my code is

public static DataSet GetGmailContacts(string App_Name, string Uname, string UPassword)
    {

        DataSet ds = new DataSet();

        DataTable dt = new DataTable();

        DataColumn C2 = new DataColumn();

        C2.DataType = Type.GetType("System.String");

        C2.ColumnName = "EmailID";

        dt.Columns.Add(C2);



        RequestSettings rs = new RequestSettings(App_Name, Uname, UPassword);

        rs.AutoPaging = true;

        ContactsRequest cr = new ContactsRequest(rs);

        Feed<contact> f = cr.GetContacts();

        foreach (Contact t in f.Entries)
        {

            foreach (EMail email in t.Emails)
            {

                DataRow dr1 = dt.NewRow();

                dr1["EmailID"] = email.Address.ToString();

                dt.Rows.Add(dr1);

            }

        }

        ds.Tables.Add(dt);

        return ds;

    } 



例外情况是:


And exception is:

<br />
Execution of request returned unexpected result: http://www.google.com/m8/feeds/contacts/default/fullMovedPermanently</contact>

推荐答案

我想你需要更新DLL。

参考评论 - ASP.NET:导入Gmail联系人 [ ^ ]。

I guess you need to update the DLL.
Refer comment - ASP.NET: Import Gmail Contacts[^].
Quote:

您需要更新Google DLL。只有https://(SSL)适用于01 / march / 2014

You need to update Google DLL. Only https:// (SSL) works from 01/march/2014


请通过以下链接进一步了解。



http://www.c-sharpcorner .com / uploadfile / BangaruBabu / import-gmail-contacts-into-Asp-Net-gridview / [ ^ ]
please go through below link for further .

http://www.c-sharpcorner.com/uploadfile/BangaruBabu/import-gmail-contacts-into-Asp-Net-gridview/[^]


在发布任何问题之前谷歌如果你不能找到结果然后发布。



你的ans是: https://code.google.com/p/google-gdata/issues/detail?id=507 [ ^ ]
Before posting any question google it if you unable found result then post it.

Your ans is : https://code.google.com/p/google-gdata/issues/detail?id=507[^]


这篇关于从gmail导入联系人的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆