English 中文(简体)
通过链接分享的问题 平等签署
原标题:Problems with sharing via LinkedIn a link with equal sign

I ve encountered an issue with LinkedIn share API. I am working on a iPhone project, testing my application on iOS 4.0, 5.0. I used this project as an example:

[https://github.com/synedra/LinkedIn-OAuth-Sample-Client]

我认为,我是成功实施本年度计划之后的先天,不仅是为了分享最新情况,而且采用了以下格式(如[https://developer.linkedin.com/documents/comm-api]:

<?xml version="1.0" encoding="UTF-8"?>
<share>
  <comment>83% of employers will use social media to hire: 78% LinkedIn, 55% Facebook, 45% Twitter [SF Biz Times] http://bit.ly/cCpeOD</comment>
  <content>
     <title>Survey: Social networks top hiring tool - San Francisco Business Times</title>
     <submitted-url>http://sanfrancisco.bizjournals.com/sanfrancisco/stories/2010/06/28/daily34.html</submitted-url>
     <submitted-image-url>http://images.bizjournals.com/travel/cityscapes/thumbs/sm_sanfrancisco.jpg</submitted-image-url>
  </content>
  <visibility>
     <code>anyone</code>
  </visibility>
</share>

Following advices and examples, I was preparing a JSON string that i was using. So, i got this:

{
  "visibility":
  {
        "code":"anyone"
  },
  "comment":"Asd",
  "content":
  {
        "submitted-url":"http://google.com",
        "title":"googloo",
        "submitted-image-url":"http://pikci.ru/images/img_srchttpwwwcomputerrivercomimagessamsung-chat-335-qwer.jpg"
  }
}

Well, with this data inside, it works like a charm. the update is with image, clickable title and stuff. Perfect.

Then, i tried to put a link(because i really needed in purpose of my project) with a Equal sign in it: "=", like for example we have http://www.google.md/#q=Nicolas+Steno&ct=steno12-hp&oi=ddle&bav=on.2,or.r_gc.r_pw.,cf.osb&fp=8c5a975d815425a&biw=1920&bih=881

Well, if we use this link in submitted-url, and send it, the LinkedIn will receive it, and even will give us a response. But it WONT update to the new status! It s a huge bug for my application, because the share won t work, but more than a half of the shared links will have equal sign in it. It is the third day when i m fighting with it. I was trying different coding functions, different "smarty-pants" moves, but failed.

If anyone has a clue about what is going on here, I will hugely appreciate it...

最佳回答

当我把这个机构交给联系人时 在我获得最新地位:

{
    "comment": "Posting from the API using JSON", 
    "content": {
         "submitted-url": 
              "http://www.google.md/#q=Nicolas+Steno&ct=steno12-hp&oi=ddle&bav=on.2,or.r_gc.r_pw.,cf.osb&fp=8c5a975d815425a&biw=1920&bih=881"
     }, "visibility": {
         "code": "anyone"
     }
}

然而,这一联系本身并没有正确解决。 可能的话,有关URL的东西正在缩短我们的联系时间——我们重新努力解决这些问题,但与此同时,你可以使用谷歌·URL缩短了URL:

body = {"longUrl": article[ articleContent ][ resolvedUrl ]}
resp,content = http.request("https://www.googleapis.com/urlshortener/v1/url?key=xxx","POST",body=simplejson.dumps(body),headers={"Content-Type":"application/json"})
googleresponse = simplejson.loads(content)

... and then share that to LinkedIn. I realize it s a suboptimal solution, but until the share function gets fixed to handle these URLs it should get you going.

问题回答

暂无回答




相关问题
List Contents of Directory in a UITableView

I am trying to list the contents of Ringtones directory in a TableView, however, I am only getting the last file in the directory in ALL cells, instead of file per cell. This is my code: - (...

iPhone NSUserDefaults persistance difficulty

In my app i have a bunch of data i store in the NSUserdefaults. This information consists of an NSObject (Object1) with NSStrings and NSNumbers and also 2 instances of yet another object (Object2). ...

Writing a masked image to disk as a PNG file

Basically I m downloading images off of a webserver and then caching them to the disk, but before I do so I want to mask them. I m using the masking code everyone seems to point at which can be found ...

Resize UIImage with aspect ratio?

I m using this code to resize an image on the iPhone: CGRect screenRect = CGRectMake(0, 0, 320.0, 480.0); UIGraphicsBeginImageContext(screenRect.size); [value drawInRect:screenRect blendMode:...

Allowing interaction with a UIView under another UIView

Is there a simple way of allowing interaction with a button in a UIView that lies under another UIView - where there are no actual objects from the top UIView on top of the button? For instance, ...

热门标签