samuelclay / NewsBlur

NewsBlur is a personal news reader that brings people together to talk about the world. A new sound of an old instrument.
http://www.newsblur.com
MIT License
6.88k stars 1k forks source link

iOS: Native share sheet not working #1789

Open samuelclay opened 1 year ago

samuelclay commented 1 year ago

See this thread: https://forum.newsblur.com/t/ios-native-share-actions-not-working/9926

Dejal commented 1 year ago

The same logic is used for saving, sharing, and adding, so if one works, the others should. I confirm that saving and sharing works, but adding doesn't. So perhaps the issue is with the URL, or server side.

Here's an example; I do a POST to https://www.newsblur.com/api/add_url/[token] (where [token] is my user token) with body folder=What&url=http://sinclairtrails.com/. Is that the correct URL?

acdha commented 1 year ago

Is there a good way to get debug logs for this? I found this comment because I noticed that about half of the time when I share a story it isn't shared and only a percentage of time does Newsblur.app show the unable to share notification. I'd like never to get that notification without a retry option but this morning I was noticing that almost nothing was actually being shared.

Interestingly, it appears to be specific to the native sharing path: for example, I saw https://www.propublica.org/article/clarence-thomas-harlan-crow-private-school-tuition-scotus show up in the Propublica RSS feed. If I open the story using either the in-app browser or the Safari app and try to share it using the sharing widget, I get no error and no share. When I tried to share it using the built-in option when viewing the feed in Newsblur.app, it worked instantly the first time.

samuelclay commented 1 year ago

@dejal The URL is https://newsblur.com/api/share_story/ and the parameters are title, content, story_url, comments, and the optional feed_id (retrieved from: https://newsblur.com/api/add_site_load_script/?url=https%3A%2F%2Fwww.propublica.org%2Farticle%2Fclarence-thomas-harlan-crow-private-school-tuition-scotus&time=1687280113249 ),

Dejal commented 1 year ago

@samuelclay Can you please clarify the URL and parameters. I'm looking for them for the Add This Site option, not share.

The add_site_laod_script URL is used by the bookmarklet, but doesn't include parameters to specify the folder or add a new folder.

Looking at NewsBlur/apps/api/views.py, there is an add_site function that has the expected parameters, and looking at NewsBlur/apps/api/urls.py, api/add_site and api/add_url seem to be synonyms. Is that the correct code?

It seems to have logging, so can you try it and check the server log to see if it gets called?

(Edit to add: note, the share plugin doesn't work with the Dev edition of the app; you'll need to use the regular edition.)