After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 729837 - Add Foursquare support
Add Foursquare support
Status: RESOLVED FIXED
Product: gnome-online-accounts
Classification: Core
Component: general
3.13.x
Other All
: Normal enhancement
: ---
Assigned To: GNOME Online Accounts maintainer(s)
GNOME Online Accounts maintainer(s)
Depends on:
Blocks: 731113
 
 
Reported: 2014-05-08 20:36 UTC by Damián Nohales
Modified: 2014-12-18 13:14 UTC
See Also:
GNOME target: ---
GNOME version: Unversioned Enhancement


Attachments
DON'T APPLY: Add Foursquare support v1 (23.85 KB, patch)
2014-05-08 20:44 UTC, Damián Nohales
needs-work Details | Review
Add Foursquare support - v2 (36.96 KB, patch)
2014-06-12 17:28 UTC, Damián Nohales
needs-work Details | Review
Add Foursquare support - v3 (36.84 KB, patch)
2014-06-13 13:09 UTC, Debarshi Ray
none Details | Review
Foursquare GNOME screenshot (51.44 KB, image/png)
2014-06-13 13:17 UTC, Debarshi Ray
  Details
Add Foursquare support (36.84 KB, patch)
2014-12-13 13:33 UTC, Damián Nohales
needs-work Details | Review
Add Foursquare (36.69 KB, patch)
2014-12-18 09:23 UTC, Debarshi Ray
committed Details | Review

Description Damián Nohales 2014-05-08 20:36:12 UTC
Hello,

As my GSoC project [1] needs Foursquare API support to be accomplished, one of the task would be to add the Foursquare provider to GOA.

Thanks!

[1] https://wiki.gnome.org/Outreach/SummerOfCode/2014/Projects/DamianNohales_MapsFoursquareFacebook
Comment 1 Damián Nohales 2014-05-08 20:44:02 UTC
Created attachment 276201 [details] [review]
DON'T APPLY: Add Foursquare support v1

This add Foursquare support, I've tested the provider and it seems to be working, but it should not be applied since there is no default Foursquare Client ID because there is no GNOME official Foursquare app yet, also, the images should be changed to don't be so ugly :) .

So, this patch is only for code review purpose.

Thanks!
Comment 2 Damián Nohales 2014-06-02 18:25:26 UTC
Any update on this?

The check-in integration in GNOME Maps that includes Foursquare Check-In support is happening at #731113.

Thanks!
Comment 3 Debarshi Ray 2014-06-09 16:27:22 UTC
Review of attachment 276201 [details] [review]:

Looks good, Damián. For some reason Git thinks that the patch is corrupt and asks "Did you hand edit your patch?", which is why I could not actually try it out. Maybe try creating a Git branch somewhere?

::: configure.ac
@@ +333,3 @@
+                              [Enable Foursquare provider])],
+                              [],
+                              [enable_foursquare=yes])

Lets keep enable_foursquare=no until bug 731113 is finished.

@@ +340,3 @@
+                            [])
+if test "$with_foursquare_client_id" = ""; then
+  with_foursquare_client_id=""

Eventually we will need a default client ID. Do you want to own it? Or do the Maps maintainers want to own it? Or should I do it? Can there be multiple co-owners of it? Whoever ends up owning it should fill in https://wiki.gnome.org/Projects/GnomeOnlineAccounts/Providers

::: po/POTFILES.in
@@ +16,3 @@
 src/goabackend/goaowncloudprovider.c
 src/goabackend/goapocketprovider.c
+src/goabackend/goafoursquareprovider.c

This should move up so that the file is sorted alphabetically.

::: src/goabackend/goafoursquareprovider.c
@@ +1,3 @@
+/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
+/*
+ * Copyright (C) 2014 Red Hat, Inc.

Are you sure that the copyright belongs to Red Hat? You wrote it, so you should have the copyright.

@@ +125,3 @@
+{
+  return 1;
+}

You don't need this when the provider is new because the default implementation will set it to 0, which is good enough. You will need this later if you change the scopes used by the provider.

@@ +337,3 @@
+  g_free (id);
+  return ret;
+}

Do you really need to implement is_deny_node? If Foursquare is sending OAuth2 compliant error messages, then we should not need it any more. See bug 709570

::: src/goabackend/goafoursquareprovider.h
@@ +1,3 @@
+/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
+/*
+ * Copyright (C) 2014 Red Hat, Inc.

Same thing about the copyright notice.

::: src/goabackend/goaprovider.c
@@ +788,3 @@
+#ifdef GOA_FOURSQUARE_ENABLED
+      type = GOA_TYPE_FOURSQUARE_PROVIDER;
+#endif

This part has changed a bit in current master. Now you need to add it to the ordered_builtins_map array.
Comment 4 Damián Nohales 2014-06-09 16:51:13 UTC
(In reply to comment #3)
> Review of attachment 276201 [details] [review]:
> 
> Looks good, Damián. For some reason Git thinks that the patch is corrupt and
> asks "Did you hand edit your patch?", which is why I could not actually try it
> out. Maybe try creating a Git branch somewhere?

That's my fault, I actually edited the patch by hand to delete the the client_id from configure.ac. I didn't know about the details of diff format so I carelessly edited the patch, sorry about that.

> 
> ::: configure.ac
> @@ +333,3 @@
> +                              [Enable Foursquare provider])],
> +                              [],
> +                              [enable_foursquare=yes])
> 
> Lets keep enable_foursquare=no until bug 731113 is finished.
> 
> @@ +340,3 @@
> +                            [])
> +if test "$with_foursquare_client_id" = ""; then
> +  with_foursquare_client_id=""
> 
> Eventually we will need a default client ID. Do you want to own it? Or do the
> Maps maintainers want to own it? Or should I do it? Can there be multiple
> co-owners of it? Whoever ends up owning it should fill in
> https://wiki.gnome.org/Projects/GnomeOnlineAccounts/Providers

No problem, I'm going to create the app.

> 
> ::: po/POTFILES.in
> @@ +16,3 @@
>  src/goabackend/goaowncloudprovider.c
>  src/goabackend/goapocketprovider.c
> +src/goabackend/goafoursquareprovider.c
> 
> This should move up so that the file is sorted alphabetically.
> 
> ::: src/goabackend/goafoursquareprovider.c
> @@ +1,3 @@
> +/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
> +/*
> + * Copyright (C) 2014 Red Hat, Inc.
> 
> Are you sure that the copyright belongs to Red Hat? You wrote it, so you should
> have the copyright.
> 
> @@ +125,3 @@
> +{
> +  return 1;
> +}
> 
> You don't need this when the provider is new because the default implementation
> will set it to 0, which is good enough. You will need this later if you change
> the scopes used by the provider.
> 
> @@ +337,3 @@
> +  g_free (id);
> +  return ret;
> +}
> 
> Do you really need to implement is_deny_node? If Foursquare is sending OAuth2
> compliant error messages, then we should not need it any more. See bug 709570
> 
> ::: src/goabackend/goafoursquareprovider.h
> @@ +1,3 @@
> +/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
> +/*
> + * Copyright (C) 2014 Red Hat, Inc.
> 
> Same thing about the copyright notice.
> 
> ::: src/goabackend/goaprovider.c
> @@ +788,3 @@
> +#ifdef GOA_FOURSQUARE_ENABLED
> +      type = GOA_TYPE_FOURSQUARE_PROVIDER;
> +#endif
> 
> This part has changed a bit in current master. Now you need to add it to the
> ordered_builtins_map array.

All right, I'll make the changes in the following days. Thanks for the review!
Comment 5 Zeeshan Ali 2014-06-10 17:53:54 UTC
(In reply to comment #3)
> Review of attachment 276201 [details] [review]:
> 
> ::: configure.ac
> @@ +333,3 @@
> +                              [Enable Foursquare provider])],
> +                              [],
> +                              [enable_foursquare=yes])
> 
> Lets keep enable_foursquare=no until bug 731113 is finished.
> 
> @@ +340,3 @@
> +                            [])
> +if test "$with_foursquare_client_id" = ""; then
> +  with_foursquare_client_id=""
> 
> Eventually we will need a default client ID. Do you want to own it? Or do the
> Maps maintainers want to own it? Or should I do it? Can there be multiple
> co-owners of it? Whoever ends up owning it should fill in
> https://wiki.gnome.org/Projects/GnomeOnlineAccounts/Providers

Done. client ID: NNPSDPQKEZRSPSMWQOQ3EXQKET5TMZ0KQTQ4KUU0WHKLO0YG.
Comment 6 Damián Nohales 2014-06-12 17:28:35 UTC
Created attachment 278362 [details] [review]
Add Foursquare support - v2

Plus the corrections pointed in the review, this version also adds the gtk-doc sections for the 
GoaFoursquareProvider.
Comment 7 Debarshi Ray 2014-06-13 13:07:49 UTC
Review of attachment 278362 [details] [review]:

Thanks for the new patch, Damián. Mostly looks good. A few comments below, and it would be nice to add https://developer.foursquare.com/overview/auth to README.

::: gnome-online-accounts.doap
@@ +16,3 @@
     providers for Google, ownCloud, Facebook, Flickr, Windows Live,
+    Pocket, Foursquare, Microsoft Exchange, IMAP/SMTP, Jabber, SIP and
+    Kerberos.

Nice. I like your attention to detail. :)

::: src/goabackend/goafoursquareprovider.c
@@ +136,3 @@
+
+gboolean
+get_use_mobile_browser (GoaOAuth2Provider *provider)

You forgot the static. :)

@@ +139,3 @@
+{
+  /* Foursquare needs to identify the browser as mobile to
+   * provide a better interface for GOA */

This comment is stating the obvious because the documentation for goa_oauth2_provider_get_use_mobile_browser already says what it is for. I would remove it.

More importantly we don't we use display=touch as documented [1] instead of this hack? I don't know what is the difference between touch and wap, but touch sounds correct and works.

[1] https://developer.foursquare.com/overview/auth

@@ +163,3 @@
+  JsonParser *parser;
+  JsonObject *json_object;
+  JsonObject *json_contact_object;

Unused variable.

@@ +189,3 @@
+  if (!rest_proxy_call_sync (call, error))
+  {
+    printf("1\n%d\n%s\n", rest_proxy_call_get_status_code (call), rest_proxy_call_get_status_message (call));

These debug statements can be removed, right?

@@ +194,3 @@
+  if (rest_proxy_call_get_status_code (call) != 200)
+    {
+      printf("2\n");

Ditto.

@@ +210,3 @@
+                                   &identity_error))
+    {
+      printf("3\n");

Ditto.

@@ +222,3 @@
+    }
+
+  /* Get response.user member */

These comments are also stating the obvious in my opinion.

@@ +297,3 @@
+  g_free (presentation_identity);
+  if (parser != NULL)
+    g_object_unref (parser);

Use g_clear_object. I know that we use if (...) g_object_unref in parts of the code, but those were written before g_clear_object came into existence and we should slowly migrate them.

@@ +328,3 @@
+
+  g_object_get (element, "type", &element_type, NULL);
+  if (g_strcmp0 (element_type, "text") != 0)

It should be "email", not "text". ;-)

@@ +359,3 @@
+  gboolean ret = FALSE;
+
+  account = NULL;

Put this where you defined 'account', since that is what you have done with the other variables. Another one of those cases where the coding style is a bit mixed up in the code base.
Comment 8 Debarshi Ray 2014-06-13 13:09:32 UTC
Created attachment 278398 [details] [review]
Add Foursquare support - v3

I fixed all the minor issues. We need to decide on the 'display=touch vs faking a mobile UA' issue. I slightly prefer using what is documented by the web service.
Comment 9 Debarshi Ray 2014-06-13 13:16:50 UTC
(In reply to comment #5)

Hey, Zeeshan,

> Done. client ID: NNPSDPQKEZRSPSMWQOQ3EXQKET5TMZ0KQTQ4KUU0WHKLO0YG.

Would it be possible to create a GNOME Foundation account on Foursquare? Currently it prominently shows your name against GNOME in the user's settings (see attachment). It might be better to have some thing that is a little less personal. It looks to me that Foursquare actually encourages creating non-personal accounts for these cases after reading the first paragraph in https://developer.foursquare.com/overview/auth

I know that some providers frown upon non-human accounts (eg., Facebook), but if it is possible in this case it would be nice to do so.
Comment 10 Debarshi Ray 2014-06-13 13:17:29 UTC
Created attachment 278399 [details]
Foursquare GNOME screenshot
Comment 11 Damián Nohales 2014-06-13 14:37:26 UTC
> @@ +139,3 @@
> +{
> +  /* Foursquare needs to identify the browser as mobile to
> +   * provide a better interface for GOA */
> 
> This comment is stating the obvious because the documentation for
> goa_oauth2_provider_get_use_mobile_browser already says what it is for. I would
> remove it.
> 
> More importantly we don't we use display=touch as documented [1] instead of
> this hack? I don't know what is the difference between touch and wap, but touch
> sounds correct and works.
> 
> [1] https://developer.foursquare.com/overview/auth
> 

Ah, I think I missed that part of the documentation (or maybe read and forgotten :( ). Yes, display=touch has the same effect than using the user-agent hack.

As a side note, the documentation does not recommend to force an specific display unless we are using "webpopup" option. I really don't know why.

I've tried "webpopup" too, it looks better (without the brand header) and works too, but the documentation says that will open a popup for us, redirects the parent window and then close the popup (so, it works and looks better, but does not seem correct to our case and perhaps only coincidentally works)

In conclusión, I prefer to use the display=touch option, it seems safer.

> @@ +163,3 @@
> +  JsonParser *parser;
> +  JsonObject *json_object;
> +  JsonObject *json_contact_object;
> 
> Unused variable.
> 
> @@ +189,3 @@
> +  if (!rest_proxy_call_sync (call, error))
> +  {
> +    printf("1\n%d\n%s\n", rest_proxy_call_get_status_code (call),
> rest_proxy_call_get_status_message (call));
> 
> These debug statements can be removed, right?
> 
> @@ +194,3 @@
> +  if (rest_proxy_call_get_status_code (call) != 200)
> +    {
> +      printf("2\n");
> 
> Ditto.
> 
> @@ +210,3 @@
> +                                   &identity_error))
> +    {
> +      printf("3\n");
> 
> Ditto.
> 

Oh my God, what a shame! :(

> @@ +222,3 @@
> +    }
> +
> +  /* Get response.user member */
> 
> These comments are also stating the obvious in my opinion.
> 
> @@ +297,3 @@
> +  g_free (presentation_identity);
> +  if (parser != NULL)
> +    g_object_unref (parser);
> 
> Use g_clear_object. I know that we use if (...) g_object_unref in parts of the
> code, but those were written before g_clear_object came into existence and we
> should slowly migrate them.
> 
> @@ +328,3 @@
> +
> +  g_object_get (element, "type", &element_type, NULL);
> +  if (g_strcmp0 (element_type, "text") != 0)
> 
> It should be "email", not "text". ;-)
> 
> @@ +359,3 @@
> +  gboolean ret = FALSE;
> +
> +  account = NULL;
> 
> Put this where you defined 'account', since that is what you have done with the
> other variables. Another one of those cases where the coding style is a bit
> mixed up in the code base.
Comment 12 Damián Nohales 2014-06-22 19:20:30 UTC
(In reply to comment #9)
> (In reply to comment #5)
> 
> Hey, Zeeshan,
> 
> > Done. client ID: NNPSDPQKEZRSPSMWQOQ3EXQKET5TMZ0KQTQ4KUU0WHKLO0YG.
> 
> Would it be possible to create a GNOME Foundation account on Foursquare?
> Currently it prominently shows your name against GNOME in the user's settings
> (see attachment). It might be better to have some thing that is a little less
> personal. It looks to me that Foursquare actually encourages creating
> non-personal accounts for these cases after reading the first paragraph in
> https://developer.foursquare.com/overview/auth
> 
> I know that some providers frown upon non-human accounts (eg., Facebook), but
> if it is possible in this case it would be nice to do so.

A GNOME member should create a page in Foursquare [1] with a proper foundation e-mail address.

 [1] http://business.foursquare.com/brands/
Comment 13 Zeeshan Ali 2014-08-22 14:33:24 UTC
(In reply to comment #9)
> (In reply to comment #5)
> 
> Hey, Zeeshan,
> 
> > Done. client ID: NNPSDPQKEZRSPSMWQOQ3EXQKET5TMZ0KQTQ4KUU0WHKLO0YG.
> 
> Would it be possible to create a GNOME Foundation account on Foursquare?
> Currently it prominently shows your name against GNOME in the user's settings
> (see attachment). It might be better to have some thing that is a little less
> personal. It looks to me that Foursquare actually encourages creating
> non-personal accounts for these cases after reading the first paragraph in
> https://developer.foursquare.com/overview/auth
> 
> I know that some providers frown upon non-human accounts (eg., Facebook), but
> if it is possible in this case it would be nice to do so.

I need gnome twitter account password from aday for this and I keep forgetting to get it from him when I meet. :( I'll try to remember next I meet him but I don't its something that should block this feature.

In the absence of any reminders in past month or so I totally forgot this is blocking and now we are already in feature freeeze. :( Could you get an exception for this and get this in?
Comment 14 Zeeshan Ali 2014-08-22 14:43:57 UTC
(In reply to comment #13)
> (In reply to comment #9)
> > (In reply to comment #5)
> > 
> > Hey, Zeeshan,
> > 
> > > Done. client ID: NNPSDPQKEZRSPSMWQOQ3EXQKET5TMZ0KQTQ4KUU0WHKLO0YG.
> > 
> > Would it be possible to create a GNOME Foundation account on Foursquare?
> > Currently it prominently shows your name against GNOME in the user's settings
> > (see attachment). It might be better to have some thing that is a little less
> > personal. It looks to me that Foursquare actually encourages creating
> > non-personal accounts for these cases after reading the first paragraph in
> > https://developer.foursquare.com/overview/auth
> > 
> > I know that some providers frown upon non-human accounts (eg., Facebook), but
> > if it is possible in this case it would be nice to do so.
> 
> I need gnome twitter account password from aday for this and I keep forgetting
> to get it from him when I meet. :( I'll try to remember next I meet him but I
> don't its something that should block this feature.

To be clear, I meant that for now we can live with my name appearing. And since that will annoy people, I and Allan will be forced to get this done sooner than later. :)
Comment 15 Zeeshan Ali 2014-12-05 23:13:32 UTC
(In reply to comment #13)
> (In reply to comment #9)
> > (In reply to comment #5)
> > 
> > Hey, Zeeshan,
> > 
> > > Done. client ID: NNPSDPQKEZRSPSMWQOQ3EXQKET5TMZ0KQTQ4KUU0WHKLO0YG.
> > 
> > Would it be possible to create a GNOME Foundation account on Foursquare?
> > Currently it prominently shows your name against GNOME in the user's settings
> > (see attachment). It might be better to have some thing that is a little less
> > personal. It looks to me that Foursquare actually encourages creating
> > non-personal accounts for these cases after reading the first paragraph in
> > https://developer.foursquare.com/overview/auth

Finally done. :)

client ID: MBNU2NES5HASNDQJ25YPFGG2UGRZHPI3IYTNJGE0KIWT2HCF
Comment 16 Damián Nohales 2014-12-11 11:46:19 UTC
(In reply to comment #15)
> Finally done. :)
> 
> client ID: MBNU2NES5HASNDQJ25YPFGG2UGRZHPI3IYTNJGE0KIWT2HCF

Awesome! Thanks, Zeeshan.

The Maps's check-in patches were merged today, so I need just one thing, because right now is throwing errors. Please check the app settings and set the "Redirect URI(s)" field to "https://localhost/".

Please ping me when you are done so I can try it.
Comment 17 Zeeshan Ali 2014-12-11 18:35:08 UTC
(In reply to comment #16)
> (In reply to comment #15)
> > Finally done. :)
> > 
> > client ID: MBNU2NES5HASNDQJ25YPFGG2UGRZHPI3IYTNJGE0KIWT2HCF
> 
> Awesome! Thanks, Zeeshan.
> 
> The Maps's check-in patches were merged today, so I need just one thing,
> because right now is throwing errors. Please check the app settings and set the
> "Redirect URI(s)" field to "https://localhost/".
> 
> Please ping me when you are done so I can try it.

Done!
Comment 18 Damián Nohales 2014-12-13 13:33:43 UTC
Created attachment 292661 [details] [review]
Add Foursquare support
Comment 19 Damián Nohales 2014-12-13 13:41:26 UTC
So, I think this is ready to be merged.

Zeeshan, just a few more comments for the app:

 - Change the app website to https://www.gnome.org/ instead of https://download.gnome.org/. The second one is not very user friendly and the user can see the link in every check-in he/she make, so is quite accessible.
 - Add icon and logos, a section "Icons and Images" is in the sidebar when editing the app.
Comment 20 Zeeshan Ali 2014-12-13 14:09:52 UTC
(In reply to comment #19)
> So, I think this is ready to be merged.
> 
> Zeeshan, just a few more comments for the app:
> 
>  - Change the app website to https://www.gnome.org/ instead of
> https://download.gnome.org/. The second one is not very user friendly and the
> user can see the link in every check-in he/she make, so is quite accessible.

Well, its suppposed to be a 'Download link' so thats why I set it to that but yeah if its going to be presented to users each time they check in, former is better.

>  - Add icon and logos, a section "Icons and Images" is in the sidebar when
> editing the app.

I have set all the icons/logos now.
Comment 21 Damián Nohales 2014-12-13 14:52:34 UTC
(In reply to comment #20)
> (In reply to comment #19)
> > So, I think this is ready to be merged.
> > 
> > Zeeshan, just a few more comments for the app:
> > 
> >  - Change the app website to https://www.gnome.org/ instead of
> > https://download.gnome.org/. The second one is not very user friendly and the
> > user can see the link in every check-in he/she make, so is quite accessible.
> 
> Well, its suppposed to be a 'Download link' so thats why I set it to that but
> yeah if its going to be presented to users each time they check in, former is
> better.

Yeah, that's actually a confusing field name.

> 
> >  - Add icon and logos, a section "Icons and Images" is in the sidebar when
> > editing the app.
> 
> I have set all the icons/logos now.

The logo should be squared (width = height), if not, the icon is shown wrong [1][2]. Maybe you could add some transparent borders to the left and right side, and center the image horizontally.

[1] http://i.imgur.com/CFeN063.png
[2] http://i.imgur.com/1a5X7Q2.png
Comment 22 Zeeshan Ali 2014-12-15 16:44:00 UTC
(In reply to comment #21)
> (In reply to comment #20)
> > (In reply to comment #19)
> > > So, I think this is ready to be merged.
> > > 
> > > Zeeshan, just a few more comments for the app:
> > > 
> > >  - Change the app website to https://www.gnome.org/ instead of
> > > https://download.gnome.org/. The second one is not very user friendly and the
> > > user can see the link in every check-in he/she make, so is quite accessible.
> > 
> > Well, its suppposed to be a 'Download link' so thats why I set it to that but
> > yeah if its going to be presented to users each time they check in, former is
> > better.
> 
> Yeah, that's actually a confusing field name.
> 
> > 
> > >  - Add icon and logos, a section "Icons and Images" is in the sidebar when
> > > editing the app.
> > 
> > I have set all the icons/logos now.
> 
> The logo should be squared (width = height), if not, the icon is shown wrong
> [1][2]. Maybe you could add some transparent borders to the left and right
> side, and center the image horizontally.

I just set the icon file you sent me. It looked right in the preview at least.
Comment 23 Debarshi Ray 2014-12-18 09:22:24 UTC
Review of attachment 292661 [details] [review]:

::: configure.ac
@@ +363,3 @@
+                            [])
+if test "$with_foursquare_client_id" = ""; then
+  with_foursquare_client_id="NNPSDPQKEZRSPSMWQOQ3EXQKET5TMZ0KQTQ4KUU0WHKLO0YG"

This doesn't look like the new client ID that Zeeshan created. :)

::: src/goabackend/goafoursquareprovider.c
@@ +344,3 @@
+                                                                              connection,
+                                                                              just_added,
+                                                                              error))

The alignment is off.

@@ +388,3 @@
+get_use_mobile_browser (GoaOAuth2Provider *provider)
+{
+  return TRUE;

The mobile variant of the page is causing webkitgtk-2.4.7 to crash on my F21 system, while the non-mobile variant works. I guess, it doesn't crash for you, right? I will file a WebKit bug and see if it can be fixed.
Comment 24 Debarshi Ray 2014-12-18 09:23:59 UTC
Created attachment 292964 [details] [review]
Add Foursquare

I fixed the client ID and the alignment problem. I have kept the mobile variant of the page. If the WebKit bug is not resolved in time we can always switch to the non-mobile page later.
Comment 25 Debarshi Ray 2014-12-18 09:24:59 UTC
Thanks for all your work on this, Damián & Zeeshan. This will be in the 3.15.3 release.
Comment 26 Damián Nohales 2014-12-18 13:14:44 UTC
Review of attachment 292661 [details] [review]:

::: configure.ac
@@ +363,3 @@
+                            [])
+if test "$with_foursquare_client_id" = ""; then
+  with_foursquare_client_id="NNPSDPQKEZRSPSMWQOQ3EXQKET5TMZ0KQTQ4KUU0WHKLO0YG"

Damn!! I forgot to commit!! I tested it with the Zeeshan app, I promise :)

::: src/goabackend/goafoursquareprovider.c
@@ +388,3 @@
+get_use_mobile_browser (GoaOAuth2Provider *provider)
+{
+  return TRUE;

Hmmm... I also have webkitgtk-2.4.7 in my ArchLinux system. Actually, I got a segmentation fault on the second time I select Foursquare to add an account, to clarify, the steps are:

- Open G-C-C in online-accounts panel
- Click add and then Foursquare
- Cancel (close the window)
- Click add and then Foursquare again
- Seg fault

Maybe a problem with GOA on how deal with WebKit?