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

micropub checkins not working #1227

Closed
danito opened this issue Feb 14, 2016 · 7 comments · Fixed by #1249
Closed

micropub checkins not working #1227

danito opened this issue Feb 14, 2016 · 7 comments · Fixed by #1249

Comments

@danito
Copy link
Contributor

danito commented Feb 14, 2016

just tested http://ownyourcheckin.wirres.net/ which peso your checkin from 4sq and publish it via micropub back to your site. The status is coming to my known site but not as checkin.
See https://nxd4n.nixekinder.be/2016/checkin-foursquare-4sq-1
This is what is posted:

[published] => 2016-02-14T20:04:57+01:00
[location] => geo:50.807987237976,4.313364561688
[place_name] => Georgiana Island
[place_url] => https://foursquare.com/venue/555b4630498eec90b9af983b?ref=YOFY2SHCUPCRRJUBFNI2D1SU3IKOFBHOGSX3ZN5CDEARGODM
[category] => Array
(
[] => checkin
[] => foursquare
[] => 4sq
)

[content] =>
[syndication] => https://foursquare.com/forward/checkin/56c0cfd9498e254d8a1ecb77

The checkin category is ignored or probably nothing checks against if it is possible to publish a checkin entity if it is enabled.

@kylewm
Copy link
Collaborator

kylewm commented Feb 15, 2016

hmm, well category is not a reliable way to determine post type in micropub... you generally have to infer the post type from which properties are given. see http://indiewebcamp.com/post-type-discovery

at this time, it looks like it's impossible to distinguish a check-in from a note with location info. feel free to come chat in #indiewebcamp (freenode irc) if you want to try to work out how it can be done.

@danito
Copy link
Contributor Author

danito commented Feb 15, 2016

I see, this is not so easy.
But I guess without a indeWebContentType = checkin it wouldn't work anyways.

@danito
Copy link
Contributor Author

danito commented Feb 15, 2016

I created a branch where I modified the IdnoPlugins/IndiePub/Pages/MicroPub/Endpoint.php so it grabs the location and the place_name from the MicroPub and saves a new checkin.

In this case I treat all entries with a location as a new checkin. If you use Ownyourgram.com and add a location to your Instagram, you will also end up with a checkin rather than a photo in your Known.

Now, the question remains, what is a checkin and how is it different to a note with location data..? Do I prefer a photo with a link to (or embed) a map or a checkin with a photo... or both?

@kylewm
Copy link
Collaborator

kylewm commented Feb 16, 2016

@dissolve suggested including a (optional) parameter in the publish request mp-type=checkin to differentiate. http://indiewebcamp.com/irc/2016-02-16/line/1455653554317

It doesn't have the ideological purity of the post-type-discovery approach, but it's a useful hedge since Known has very explicit post types.

@diplix would you be willing to add this field to https://github.com/diplix/OwnYourCheckin ?

@diplix
Copy link

diplix commented Feb 16, 2016

sure, i’ll look into it and test the mp-type=checkin parameter.

@diplix
Copy link

diplix commented Feb 16, 2016

ok, hth, this is what get’s send now:

Array
(
    [mp-type] => checkin
    [published] => 2016-02-15T18:20:30+01:00
    [location] => geo:52.553054478082,13.346972465515
    [place_name] => E Reichelt
    [place_url] => https://foursquare.com/venue/4c5912d66407d13a676db128?ref=YOFY2SHCUPCRRJUBFNI2D1SU3IKOFBHOGSX3ZN5CDEARGODM
    [category] => Array
        (
            [0] => checkin
            [1] => foursquare
            [2] => 4sq
        )

    [content] => 2 flaschen bier 1,98€, 18 minuten wartezeit anner kasse.
    [syndication] => https://foursquare.com/forward/checkin/56c208de498e33e48e0f2d8d
)

diplix/OwnYourCheckin@b383f52

@kylewm
Copy link
Collaborator

kylewm commented Feb 17, 2016

THanks @diplix and @danito! Nice work 💃

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