Giter Site home page Giter Site logo

ivanpan / cordova_weibo Goto Github PK

View Code? Open in Web Editor NEW
196.0 196.0 87.0 44.26 MB

A Cordova wrapper around the Sina WeiboSDK for Android and iOS. Provides access to ssoLogin, WeiboSharing etc...

License: MIT License

Java 26.11% Objective-C 61.84% JavaScript 4.09% CSS 5.55% HTML 2.41%
cordova-plugin cordova-weibo sina weibo weibo-sso-login weibosdk

cordova_weibo's People

Contributors

alonehover avatar cxcxcxcx avatar ivanpan avatar plrthink avatar ziyunhx avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

cordova_weibo's Issues

想请问

当进入login with weibo页面时,按了ok键,但是只是中间出现旋转logging in...,就没反应了,不过我的App还没经过审刻,请问这是正常的吗?

为什么ionic build 和run的时候有这么多warning

按照步骤安装插件,安装后 ionic build 发现很多warning。不过没有影响插件正常使用。

取一部分贴上来:
warning: /var/folders/1n/49myhky1215gnqd43rvhl7cw0000gn/C/com.apple.DeveloperTools/7.0-7A220/Xcode/SharedPrecompiledHeaders/WeiboSDK-Prefix-gccnypuzcgdpbcbxkksbfqqsmdwa/WeiboSDK-Prefix.pch.pch: No object file for requested architecture
while processing /Users/yaoxingtang/maybi/maybi-ionic/platforms/ios/maybi-ionic/Plugins/cordova-plugin-weibosdk/libWeiboSDK.a(WBHttpRequest.o):
warning: Could not resolve external type c:objc(cs)NSString
while processing /Users/yaoxingtang/maybi/maybi-ionic/platforms/ios/maybi-ionic/Plugins/cordova-plugin-weibosdk/libWeiboSDK.a(WBHttpRequest.o):
warning: Could not resolve external type c:objc(cs)NSDictionary
while processing /Users/yaoxingtang/maybi/maybi-ionic/platforms/ios/maybi-ionic/Plugins/cordova-plugin-weibosdk/libWeiboSDK.a(WBHttpRequest.o):
warning: Could not resolve external type c:objc(cs)NSURL
while processing /Users/yaoxingtang/maybi/maybi-ionic/platforms/ios/maybi-ionic/Plugins/cordova-plugin-weibosdk/libWeiboSDK.a(WBHttpRequest.o):
warning: Could not resolve external type c:objc(cs)NSArray
while processing /Users/yaoxingtang/maybi/maybi-ionic/platforms/ios/maybi-ionic/Plugins/cordova-plugin-weibosdk/libWeiboSDK.a(WBHttpRequest.o):
warning: Could not resolve external type c:objc(cs)NSData
while processing /Users/yaoxingtang/maybi/maybi-ionic/platforms/ios/maybi-ionic/Plugins/cordova-plugin-weibosdk/libWeiboSDK.a(WBHttpRequest.o):
warning: Could not resolve external type c:objc(cs)NSObject
while processing /Users/yaoxingtang/maybi/maybi-ionic/platforms/ios/maybi-ionic/Plugins/cordova-plugin-weibosdk/libWeiboSDK.a(WBHttpRequest.o):
warning: Could not resolve external type c:objc(cs)NSURLConnection
while processing /Users/yaoxingtang/maybi/maybi-ionic/platforms/ios/maybi-ionic/Plugins/cordova-plugin-weibosdk/libWeiboSDK.a(WBHttpRequest.o):
warning: Could not resolve external type c:objc(cs)NSMutableData
while processing /Users/yaoxingtang/maybi/maybi-ionic/platforms/ios/maybi-ionic/Plugins/cordova-plugin-weibosdk/libWeiboSDK.a(WBHttpRequest.o):
warning: Could not resolve external type c:objc(cs)NSURLRequest
while processing /Users/yaoxingtang/maybi/maybi-ionic/platforms/ios/maybi-ionic/Plugins/cordova-plugin-weibosdk/libWeiboSDK.a(WBHttpRequest.o):
warning: Could not resolve external type c:objc(cs)NSCachedURLResponse
while processing /Users/yaoxingtang/maybi/maybi-ionic/platforms/ios/maybi-ionic/Plugins/cordova-plugin-weibosdk/libWeiboSDK.a(WBHttpRequest.o):
warning: Could not resolve external type c:objc(cs)NSError
while processing /Users/yaoxingtang/maybi/maybi-ionic/platforms/ios/maybi-ionic/Plugins/cordova-plugin-weibosdk/libWeiboSDK.a(WBHttpRequest.o):
warning: Could not resolve external type c:objc(cs)NSOperationQueue
while processing /Users/yaoxingtang/maybi/maybi-ionic/platforms/ios/maybi-ionic/Plugins/cordova-plugin-weibosdk/libWeiboSDK.a(WBHttpRequest.o):
warning: Could not resolve external type c:objc(cs)NSMutableDictionary
while processing /Users/yaoxingtang/maybi/maybi-ionic/platforms/ios/maybi-ionic/Plugins/cordova-plugin-weibosdk/libWeiboSDK.a(WBHttpRequest.o):
warning: Could not resolve external type c:objc(cs)NSHTTPCookie
while processing /Users/yaoxingtang/maybi/maybi-ionic/platforms/ios/maybi-ionic/Plugins/cordova-plugin-weibosdk/libWeiboSDK.a(WBHttpRequest.o):
warning: Could not resolve external type c:objc(cs)NSMutableURLRequest
while processing /Users/yaoxingtang/maybi/maybi-ionic/platforms/ios/maybi-ionic/Plugins/cordova-plugin-weibosdk/libWeiboSDK.a(WBHttpRequest.o):
warning: Could not resolve external type c:objc(cs)NSURLResponse
while processing /Users/yaoxingtang/maybi/maybi-ionic/platforms/ios/maybi-ionic/Plugins/cordova-plugin-weibosdk/libWeiboSDK.a(WBHttpRequest.o):
warning: Could not resolve external type c:objc(cs)NSMutableArray
while processing /Users/yaoxingtang/maybi/maybi-ionic/platforms/ios/maybi-ionic/Plugins/cordova-plugin-weibosdk/libWeiboSDK.a(WBHttpRequest.o):
warning: Could not resolve external type c:objc(cs)NSObject
while processing /Users/yaoxingtang/maybi/maybi-ionic/platforms/ios/maybi-ionic/Plugins/cordova-plugin-weibosdk/libWeiboSDK.a(WBHttpRequest.o):
warning: Could not resolve external type c:objc(cs)NSHTTPCookieStorage
while processing /Users/yaoxingtang/maybi/maybi-ionic/platforms/ios/maybi-ionic/Plugins/cordova-plugin-weibosdk/libWeiboSDK.a(WBSDKBasicWebViewController.o):

绝大多数都是libWeiboSDK.a的warning,下载最新的WEIBO IOS SDK 也没有得到解决。
请问有好的解决办法吗?

config.xml 怎么设置preference的value,我用了deep linking,但是仍然显示redirecturi mismatch <preference name="REDIRECTURI" value="http://192.168.1.17:8100/#/tabs" />

import { Component } from '@angular/core';
import {IonicPage } from 'ionic-angular';
import { ScreenComponent } from '../screens/screen.component';
import { SessionComponent } from '../session/session.component';
import { GamesComponent } from '../games/games.component';

@IonicPage({
name:'tabs',
segment:'tabsPage'
})
@component({
templateUrl: 'tabs.component.html'
})
export class TabsComponent {

tab1Root = GamesComponent;
tab2Root = ScreenComponent;
tab3Root = SessionComponent;

constructor() {

}
}

微博分享的时候imageUrl 设置无效

我的手机上装的微博版本是 5.6.0
在安装了插件之后,测试了一下示例的代码,发现在分享链接时 imageUrl 设置无效,分享出去的不是带有图片的链接,只是一个简单的链接

末安装微博时,分享到微博,内容为空

前提条件:未安装微博
设备:iphone 6 plus
版本:10.3.2

  this.shareToWeibo = function () {
    var args = {};
    args.url = "http://www.baidu.com";
    args.title = "Baidu";
    args.description = "This is Baidu";
    args.imageUrl = "https://www.baidu.com/img/bdlogo.png";
    args.defaultText = "";
    YCWeibo.shareToWeibo(function () {
      alert("share success");
    }, function (failReason) {
      alert(failReason);
    }, args);
  };

问题:发现微博分享编辑区,内容为空。

iOS使用正常,Android报错误信息sharefail,这是什么原因

Before submitting issues ...

  • 确保你的 App 在微博开放平台已审核通过.
  • 如果是 Android 平台请确保你的apk签名是正确的.
  • 请确认demo已测试通过.
  • 请先搜索相关的issues,看是否同样的问题已经有解决方案了.
  • 发生授权出错的情况,请前先去微博开发者平台咨询,也可查看微博开发的常见问题.

当你提交 issues 的时候, 请提供以下信息来帮助开发者更好的修复Bug:

  • 开发环境: 插件版本, Cordova版本, Xcode版本.
  • 如果出现错误,希望提供Xcode或Android Studio的错误日志.
  • 如果有其他额外的信息,也希望可以提供一下,帮助我们更快的定位问题.

ios微博分享shareToWeibo中image,传不过去

cordova 版本v6.5.0
xcode版本 v9.2,
cordova-plugin-weibosdk 版本0.6.0

android 一切正常 ios图片带不过去,如果图片过大,ios跳转不过去

代码如下:

var args = {};
args.url = data.link;
args.title = data.title;
args.description = data.desc;
args.image = data.imgUrl;
WeiboSDK.shareToWeibo( function () {
taskCallback( taskname, scope );
}, function ( failReason ) {
console.log(JSON.stringify(JSON.parse(failReason)));
}, args );

分享到微博时,只生成title没有链接

前提条件:安装微博
设备:iphone 6 plus
版本:10.3.2

  this.shareToWeibo = function () {
    var args = {};
    args.url = "http://www.baidu.com";
    args.title = "Baidu";
    args.description = "This is Baidu";
    args.imageUrl = "https://www.baidu.com/img/bdlogo.png";
    args.defaultText = "";
    YCWeibo.shareToWeibo(function () {
      alert("share success");
    }, function (failReason) {
      alert(failReason);
    }, args);
  };

问题:发现出来的结果是 Baidu,无链接生成。

分享到微博报错

测试微博分享时,报错:
2015-12-11 23:44:48.405 maybi-ionic[2595:955279] NSURLSession/NSURLConnection HTTP load failed (kCFStreamErrorDomainSSL, -9802)

该怎么做?

安卓无法切换账号

安卓上登录过一次微博后,退出再次登录,跳转到微博应用后立即返回(使用当前的账号授权登录),无法切换账号。

不同操作系统下安卓打包的异常,在mac上报错21324:unknown client id:3.3864865E9

在window上正常:

$ gradle -v

------------------------------------------------------------
Gradle 2.14.1
------------------------------------------------------------

Build time:   2016-07-18 06:38:37 UTC
Revision:     d9e2113d9fb05a5caabba61798bdb8dfdca83719

Groovy:       2.4.4
Ant:          Apache Ant(TM) version 1.9.6 compiled on June 29 2015
JVM:          1.8.0_73 (Oracle Corporation 25.73-b02)
OS:           Windows 10 10.0 amd64

$ node -v
v7.8.0

$ cordova -v
7.0.1

$ ionic -v
3.18.0

  • 打包正常,能正常登陆

mac 上的问题

$ gradle -v

------------------------------------------------------------
Gradle 4.3.1
------------------------------------------------------------

Build time:   2017-11-08 08:59:45 UTC
Revision:     e4f4804807ef7c2829da51877861ff06e07e006d

Groovy:       2.4.12
Ant:          Apache Ant(TM) version 1.9.6 compiled on June 29 2015
JVM:          1.8.0_91 (Oracle Corporation 25.91-b14)
OS:           Mac OS X 10.13.1 x86_64

$ node -v
v8.9.1

$ cordova -v
6.5.0

$ ionic -v
3.18.0

  • 打包正常,但是报clientId异常:21324:unkown client id :3.3864865E9

另外要说明的问题

  • 在第一次登陆的时候是需要授权,退出登陆的时候也是调用的退出登陆的方法,但是有个问题很奇怪,只要授权一次,以后都不用点击确定授权了,直接登陆跳转了,不知道这是什么情况?

登陆代码都是一样的,插件也安装正常
求指教!

分享微博时候安卓没有反应,无法打开微博

01-16 19:59:03.445 8625-9564/com.binary.ggj W/PluginManager: THREAD WARNING: exec() call to YCWeibo.shareToWeibo blocked the main thread for 42ms. Plugin should use CordovaInterface.getThreadPool().
01-16 19:59:03.450 8625-8716/com.binary.ggj I/System.out: [CDS]rx timeout:0
01-16 19:59:03.485 8625-8625/com.binary.ggj E/chromium: [ERROR:xwalk_autofill_client.cc(121)] Not implemented reached in virtual void xwalk::XWalkAutofillClient::OnFirstUserGestureObserved()
01-16 19:59:03.520 8625-8625/com.binary.ggj D/CordovaActivity: Paused the activity.
01-16 19:59:03.520 8625-8625/com.binary.ggj I/JPushPlugin: ---------------- onPause
01-16 19:59:03.610 8625-12421/com.binary.ggj I/System: core_booster, getBoosterConfig = false
01-16 19:59:03.610 8625-12421/com.binary.ggj I/System.out: [socket][4] connection /180.149.135.176:443;LocalPort=42794(25000)
01-16 19:59:03.610 8625-12421/com.binary.ggj I/System.out: [CDS]connect[/180.149.135.176:443] tm:25
01-16 19:59:03.660 8625-12421/com.binary.ggj I/System.out: [socket][/192.168.1.25:42794] connected
01-16 19:59:03.660 8625-12421/com.binary.ggj I/System.out: [CDS]rx timeout:20000
01-16 19:59:03.660 8625-12421/com.binary.ggj I/System: core_booster, getBoosterConfig = false
01-16 19:59:03.665 8625-8625/com.binary.ggj D/HwCust: Create obj success use class android.app.HwCustApplicationPackageManagerImpl
01-16 19:59:03.725 8625-8625/com.binary.ggj D/CordovaActivity: Incoming Result. Request code = 765
01-16 19:59:03.725 8625-8625/com.binary.ggj W/CordovaInterfaceImpl: Got an activity result, but no plugin was registered to receive it.
01-16 19:59:03.725 8625-8625/com.binary.ggj D/CordovaActivity: Resumed the activity.
01-16 19:59:03.725 8625-8625/com.binary.ggj I/JPushPlugin: ---------------- onResume-null-null
01-16 19:59:03.925 8625-12421/com.binary.ggj I/System: core_booster, getBoosterConfig = false
01-16 19:59:03.925 8625-12421/com.binary.ggj I/System.out: [socket][5] connection /180.149.135.176:443;LocalPort=53845(25000)
01-16 19:59:03.925 8625-12421/com.binary.ggj I/System.out: [CDS]connect[/180.149.135.176:443] tm:25
01-16 19:59:03.975 8625-12421/com.binary.ggj I/System.out: [socket][/192.168.1.25:53845] connected
01-16 19:59:03.975 8625-12421/com.binary.ggj I/System.out: [CDS]rx timeout:20000
01-16 19:59:03.975 8625-12421/com.binary.ggj I/System: core_booster, getBoosterConfig = false
android sdk 22

couldn't find "libweibosdkcore.so"

最新官网版本

Process: com.zunars.app, PID: 23446
java.lang.UnsatisfiedLinkError: dalvik.system.PathClassLoader[DexPathList[[zip file "/data/app/com.zunars.app-1/base.apk"],nativeLibraryDirectories=[/data/app/com.zunars.app-1/lib/arm64, /data/app/com.zunars.app-1/base.apk!/lib/arm64-v8a, /vendor/lib64, /system/lib64]]] couldn't find "libweibosdkcore.so"

微博开放平台分享到微博接口升级公告

尊敬的各位开发者:
您好:
为了应对黑产利用微博开放接口刷话题、刷热门等情况,微博开放平台升级并推出了新版微博分享接口,新的分享接口如下: statuses/share 第三方分享链接到微博(点击链接可查看接口文档) 您需要将原有分享、转发微博的接口,升级切换为以上新的分享接口。需要升级的原有接口有: statuses/repost 转发一条微博 statuses/update 发布一条微博 statuses/upload 上传图片并发布一条微博 statuses/upload_url_text 发布一条微博同时指定上传的图片 statuses/destroy 删除微博 请您务必在2017年6月30日前完成升级切换工作,之后原有分享、转发微博的接口,将限制使用。 如果您需要更丰富的分享功能,微博开放平台建议您使用微博SDK中集成的分享功能,实现完整的分享到微博的功能。
微博SDK:
iOS - https://github.com/sinaweibosdk/weibo_ios_sdk
Android - https://github.com/sinaweibosdk/weibo_android_sdk

android share image error:FAILED Binder Transaction,image size is greater than 1m

Before submitting issues ...

  • 确保你的 App 在微博开放平台已审核通过.
  • 如果是 Android 平台请确保你的 apk 签名是正确的.
  • 请确认 demo 已测试通过.
  • 请先搜索相关的 issues,看是否同样的问题已经有解决方案了.
  • 发生授权出错的情况,请前先去微博开发者平台咨询,也可查看微博开发的常见问题.

当你提交 issues 的时候, 请提供以下信息来帮助开发者更好的修复Bug:

  • 开发环境: 插件版本, Cordova 版本, Xcode 版本.
  • 如果出现错误,希望提供 Xcode 或 Android Studio 的错误日志.
  • 如果有其他额外的信息,也希望可以提供一下,帮助我们更快的定位问题.

weibo share iOS not working

iOS 下 weibo sso login 正常,android 平台 weibo share也正常,但 iOS下 weibo share 却没有任何反应,真机测试和 simulator 都不工作,没有报任何错,iOS的qq share 和 weixin share都正常

测试版本:
cordova-plugin-weibosdk: 0.5.8
cordova: 6.5.0
XCode: 8.2.1
iOS Simulator: iPhone SE 10.2
iOS真机: iPhone 4s 8.3
操作系统: OS X EI Captain 10.11.6

sharefail

点击弹出框为sharefail,你的qq我已经分享成功了,但是weibo,同样的方法是分享失败是怎么回事呀

分享成功没有图片

手机上有安装微博客户端,能分享成功,但是没有图片,调用如下
var args = {};
args.url = "http://www.baidu.com";
args.title = "Baidu";
args.description = "This is Baidu";
args.imageUrl = "https://www.baidu.com/img/bdlogo.png";
args.defaultText = "abcdefg";
YCWeibo.shareToWeibo(function () {
alert("share success");
}, function (failReason) {
alert(failReason);
}, args);

xcode Release 编译错误

提示:
file is universal (4 slices) but does not contain a(n) armv7s slice 。。。
libWeiboSDK.a' for architecture armv7s

请问有没有解决办法

分享成功,但是微博里没有分享的消息

你好。我们的项目使用您的插件,分享到微博之后,会提示分享成功。但是IOS中会出现链接丢失现象。安卓会出现分享的内容在草稿箱的现象。联系微博开放平台,对方给的回复是 请使用最新的SDK。请问一下这个问题是由于SDK版本造成的吗?

调用分享方法无反应

调用分享方法无反应,error也没有,但是检测客户端是否安装跟sso登录都是有用的,实在是不知道哪里有问题了...

iOS 开发环境下,分享成功了,但是显示画面链接没有带入,安卓下没有这种问题

Before submitting issues ...

  • 确保你的 App 在微博开放平台已审核通过.
  • 如果是 Android 平台请确保你的apk签名是正确的.
  • 请确认demo已测试通过.
  • 请先搜索相关的issues,看是否同样的问题已经有解决方案了.
  • 发生授权出错的情况,请前先去微博开发者平台咨询,也可查看微博开发的常见问题.

当你提交 issues 的时候, 请提供以下信息来帮助开发者更好的修复Bug:

  • 开发环境: 插件版本, Cordova版本, Xcode版本.
  • 如果出现错误,希望提供Xcode或Android Studio的错误日志.
  • 如果有其他额外的信息,也希望可以提供一下,帮助我们更快的定位问题.

插件在ios10无法运行

IOS 10 /xCode 8.1 /Cordova 6 编译之后无法调起weibo分享。控制台输入如下。

THREAD WARNING: ['YCWeibo'] took '202.842773' ms. Plugin should use a background thread.

用小米红米note4进行 monkey test的时候发生如下crash

// java.lang.NullPointerException: Attempt to invoke virtual method 'void com.sina.weibo.sdk.share.WbShareHandler.doResultIntent(android.content.Intent, com.sina.weibo.sdk.share.WbShareCallback)' on a null object reference

// at me.vanpan.weibosdk.WeiboSDKPlugin.onNewIntent(WeiboSDKPlugin.java:417)

// at org.apache.cordova.PluginManager.onNewIntent(PluginManager.java:327)

// at org.apache.cordova.CordovaWebViewImpl.onNewIntent(CordovaWebViewImpl.java:422)

// at org.apache.cordova.CordovaActivity.onNewIntent(CordovaActivity.java:257)

// at android.app.Instrumentation.callActivityOnNewIntent(Instrumentation.java:1219)

// at android.app.Instrumentation.callActivityOnNewIntent(Instrumentation.java:1231)

// at android.app.ActivityThread.deliverNewIntents(ActivityThread.java:2703)

// at android.app.ActivityThread.performNewIntents(ActivityThread.java:2715)

// at android.app.ActivityThread.handleNewIntent(ActivityThread.java:2724)

// at android.app.ActivityThread.access$1800(ActivityThread.java:180)

// at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1566)

// at android.os.Handler.dispatchMessage(Handler.java:111)

// at android.os.Looper.loop(Looper.java:207)

// at android.app.ActivityThread.main(ActivityThread.java:5791)

// at java.lang.reflect.Method.invoke(Native Method)

// at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:901)

// at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:762)

//

sharefail

使用Android的时候进行分享,是不是也需要对APK签名进行配置?

最新IOS要求使用https

求作者更新一个最新的版本,因为最新的IOS强制要求使用https,目前这个版本app store 审核没法通过

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.