Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

微博Weibo图片和链接是否可以同时分享? #99

Closed
aloveric opened this issue Aug 19, 2017 · 5 comments
Closed

微博Weibo图片和链接是否可以同时分享? #99

aloveric opened this issue Aug 19, 2017 · 5 comments

Comments

@aloveric
Copy link

1.这种方式只能分享带media图和文本
` @IBAction func shareImage(_ sender: UIButton) {

    let message = MonkeyKing.Message.weibo(.default(info: (
        title: "Image",
        description: "Rabbit",
        thumbnail: nil,
        media: .image(UIImage(named: "rabbit")!)
    ), accessToken: accessToken))

    MonkeyKing.deliver(message) { result in
        print("result: \(result)")
    }
}`

2.这种只能分享文本和带链接,但是thumbnail的image无效
` @IBAction func shareURL(_ sender: UIButton) {

    let message = MonkeyKing.Message.weibo(.default(info: (
        title: "News",
        description: "Hello Yep",
        thumbnail: UIImage(named: "rabbit"),
        media: .url(URL(string: "http://soyep.com")!)
    ), accessToken: accessToken))

    MonkeyKing.deliver(message) { result in
        print("result: \(result)")
    }
}`
@Limon-O-O
Copy link
Collaborator

你把链接放在分享出去的文本里面就好了呀....

@aloveric
Copy link
Author

@Limon-O-O 这样确实可以,但是略麻烦。不知道链接能不能加html标签,一会试试能不能被微博识别。

@aloveric
Copy link
Author

经过测试可以的,直接加http链接就行了。。

@nixzhu nixzhu closed this as completed Aug 21, 2017
@sseen
Copy link

sseen commented Feb 27, 2019

经过测试可以的,直接加http链接就行了。。

@aloveric 请问你是怎么加的有 thumbnail 的链接?

@xspyhack
Copy link
Collaborator

@sseen

let message = MonkeyKing.Message.weibo(.default(info: (
        title: "News",
        description: "Hello Yep http://soyep.com",
        thumbnail: nil,
        media: .image(UIImage(named: "rabbit")!)
    ), accessToken: accessToken))

MonkeyKing.deliver(message) { result in
    print("result: \(result)")
}

I guess.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants