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

Can't use syndication targets on Known #152

Closed
voss opened this issue Nov 13, 2018 · 5 comments
Closed

Can't use syndication targets on Known #152

voss opened this issue Nov 13, 2018 · 5 comments

Comments

@voss
Copy link

voss commented Nov 13, 2018

I'm using latest indigenous release with Known (0.9.9-a). I have a number of syndication targets setup: github, flickr, mastodon, twitter. I used to be able to syndicate to those, but maybe around 1+ month ago (I don't recall precisely), the checkboxes disappeared, and when I try create a piece of content, I get the following error message in a toast:

screenshot_20181113-170736

"Error parsing syndication targets: Value github::access_token at 0 of type java.lang.String cannot be converted to JSONObject"

To check whether it is an issue with the syndication targets, I tried loading up Quill, which shows the syndication targets just fine:

selection_345

Can I provide you with any details that can help verify if this is an Indigenous issue, or not?

@voss voss changed the title I'm using latest indigenous release with Known ... Can't use syndication targets on Known Nov 13, 2018
@swentel
Copy link
Collaborator

swentel commented Nov 13, 2018

I think it's related to idno/known#2001

I think @EdwardHinkle knows a quick workaround, so pinging.

Although I wonder whether I should make this work .. I think the iOS version can handle it.

@voss
Copy link
Author

voss commented Nov 13, 2018

Gotcha, I will see if Eddie has a workaround. Thanks!

@swentel
Copy link
Collaborator

swentel commented Nov 19, 2018

@voss could you try the following:

  1. open 'IdnoPlugins/IndiePub/Pages/MicroPub/Endpoint.php'
  2. go to line 69

Change:

   'syndicate-to' => $account_strings,

to

  'syndicate-to' => $account_data,

I've checked the latest master version, to give you more context where to look:

                switch ($query) {
                    case 'config':
                        header('Content-Type: application/json');
                        echo json_encode([
                            'media-endpoint' => \Idno\Core\Idno::site()->config()->url . 'micropub/endpoint',
                            'syndicate-to' => $account_strings,
                        ], JSON_PRETTY_PRINT);
                        break;
                    case 'syndicate-to':

The change needs to happen in the 'config' case block, not underneath (Indigenous does not call 'syndicate-to' anymore anyway.

That should fix it. The spec also says it should be an array, so I'd rather see an update in the future in Known instead of having to add code in indigenous for this.

@voss
Copy link
Author

voss commented Nov 20, 2018

That worked @swentel. Thanks a lot!

I'll make an effort to submit a change to core Known for this during the week.

@swentel
Copy link
Collaborator

swentel commented Nov 20, 2018

ok awesome, I'm going to close this then
Added this issue to the README for people having the same problem.

@swentel swentel closed this as completed Nov 20, 2018
voss added a commit to voss/known that referenced this issue Nov 20, 2018
In reference to IndiePass/indiepass-android#152

Indigenous was throwing errors when using known as it expects syndication targets to be an array, and not string.

I changed this on my own instance of known 0.9.9-a (build = 2018101001) and Indigenous can now read the syndication targets correctly.

I also checked using Quill, and Aperture, where the syndication targets also work.
benwerd pushed a commit to idno/known that referenced this issue Nov 20, 2018
fixing syndication target for micropub clients per: IndiePass/indiepass-android#152 (comment)
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

2 participants