【问题标题】:how to use the api() method of socialauth-android Library?如何使用 socialauth-android 库的 api() 方法?
【发布时间】:2013-12-26 09:33:01
【问题描述】:

social auth库的api方法包含以下参数。

api(final String url, final String methodType, final Map params, final Map headerParams, final String body)

请给我一个唱这个方法的例子。

提前致谢。

【问题讨论】:

    标签: android api linkedin socialauth


    【解决方案1】:
    @Override
        public Response api(final String url, final String methodType,
                final Map<String, String> params,
                final Map<String, String> headerParams, final String body)
                throws Exception {
            if (!isVerify) {
                throw new SocialAuthException(
                        "Please call verifyResponse function first to get Access Token");
            }
            Response response = null;
            LOG.debug("Calling URL : " + url);
            response = authenticationStrategy.executeFeed(url, methodType, params,
                    headerParams, body);
            return response;
        }
    

    推荐一位 link

    【讨论】:

    • 您好 Nikhil,感谢您的回答。我知道方法,但我在传递参数时感到困惑。我必须在 params、headerParams 和 body 字符串中传递什么值??
    猜你喜欢
    • 2013-06-22
    • 2013-05-17
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2015-08-02
    • 2015-06-15
    相关资源
    最近更新 更多