Merge lp:~mardy/account-plugins/usernames-1565772 into lp:account-plugins

Proposed by Alberto Mardegan on 2016-04-05
Status: Merged
Approved by: David Barth on 2016-05-06
Approved revision: 160
Merged at revision: 156
Proposed branch: lp:~mardy/account-plugins/usernames-1565772
Merge into: lp:account-plugins
Diff against target: 540 lines (+279/-29)
21 files modified
.bzrignore (+5/-0)
Makefile.am (+26/-6)
configure.ac (+4/-1)
data/providers/facebook.provider.in.in (+1/-1)
data/providers/flickr.provider.in.in (+1/-1)
data/providers/twitter.provider.in.in (+1/-1)
data/webkit-options/api.twitter.com.conf (+0/-2)
data/webkit-options/login.yahoo.com.conf (+0/-2)
data/webkit-options/www.facebook.com.conf (+0/-7)
debian/account-plugin-facebook.install (+0/-1)
debian/account-plugin-flickr.install (+0/-1)
debian/account-plugin-twitter.install (+0/-1)
debian/changelog (+15/-0)
debian/control (+27/-4)
debian/libaccount-plugin-facebook.install (+1/-0)
debian/libaccount-plugin-flickr.install (+1/-0)
debian/libaccount-plugin-twitter.install (+1/-0)
src/facebook.vala (+69/-0)
src/flickr.vala (+41/-0)
src/google.vala (+40/-1)
src/twitter.vala (+46/-0)
To merge this branch: bzr merge lp:~mardy/account-plugins/usernames-1565772
Reviewer Review Type Date Requested Status
PS Jenkins bot (community) continuous-integration Needs Fixing on 2016-04-06
Online Accounts 2016-04-05 Pending
Review via email: mp+290970@code.launchpad.net

Commit message

Retrieve usernames in Facebook, Flickr, Google and Twitter plugins

Use the new APIs in libaccount-plugin to override the query_username() method; remove the unneeded webkit-options files from some account providers.

Description of the change

Retrieve usernames in Facebook, Flickr, Google and Twitter plugins

Use the new APIs in libaccount-plugin to override the query_username() method; remove the unneeded webkit-options files from some account providers.

To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file '.bzrignore'
2--- .bzrignore 2013-03-19 08:52:34 +0000
3+++ .bzrignore 2016-04-05 11:21:38 +0000
4@@ -6,6 +6,7 @@
5 *.service
6 *.substvars
7 *.stamp
8+*.trs
9 INSTALL
10 Makefile
11 Makefile.in
12@@ -50,7 +51,11 @@
13 .deps
14 .dirstamp
15 .libs
16+/src/facebook.c
17+/src/flickr.c
18 /src/generic-oauth.c
19 /src/google.c
20+/src/twitter.c
21+/test-driver
22 /test-provider
23 /test-service
24
25=== modified file 'Makefile.am'
26--- Makefile.am 2015-04-17 08:53:11 +0000
27+++ Makefile.am 2016-04-05 11:21:38 +0000
28@@ -8,8 +8,11 @@
29 if ENABLE_LIBACCOUNT_PLUGIN
30 # Binary account plugins.
31 plugin_LTLIBRARIES = \
32+ libfacebook.la \
33+ libflickr.la \
34 libgeneric-oauth.la \
35- libgoogle.la
36+ libgoogle.la \
37+ libtwitter.la
38
39 VALAFLAGS = \
40 --vapidir $(top_srcdir)/src \
41@@ -36,12 +39,32 @@
42 -no-undefined \
43 -export-symbols-regex '^ap_module_get_object_type'
44
45-libgoogle_la_CPPFLAGS = $(plugin_cppflags)
46-libgoogle_la_LIBADD = $(plugin_libadd)
47+libfacebook_la_CPPFLAGS = $(plugin_cppflags) $(RESTAPIS_CFLAGS)
48+libfacebook_la_LIBADD = $(plugin_libadd) $(RESTAPIS_LIBS)
49+libfacebook_la_LDFLAGS = $(plugin_ldflags)
50+libfacebook_la_VALAFLAGS = --pkg libsoup-2.4 --pkg json-glib-1.0
51+libfacebook_la_SOURCES = \
52+ src/facebook.vala
53+
54+libflickr_la_CPPFLAGS = $(plugin_cppflags)
55+libflickr_la_LIBADD = $(plugin_libadd)
56+libflickr_la_LDFLAGS = $(plugin_ldflags)
57+libflickr_la_SOURCES = \
58+ src/flickr.vala
59+
60+libgoogle_la_CPPFLAGS = $(plugin_cppflags) $(RESTAPIS_CFLAGS)
61+libgoogle_la_LIBADD = $(plugin_libadd) $(RESTAPIS_LIBS)
62 libgoogle_la_LDFLAGS = $(plugin_ldflags)
63+libgoogle_la_VALAFLAGS = --pkg libsoup-2.4 --pkg json-glib-1.0
64 libgoogle_la_SOURCES = \
65 src/google.vala
66
67+libtwitter_la_CPPFLAGS = $(plugin_cppflags)
68+libtwitter_la_LIBADD = $(plugin_libadd)
69+libtwitter_la_LDFLAGS = $(plugin_ldflags)
70+libtwitter_la_SOURCES = \
71+ src/twitter.vala
72+
73 libgeneric_oauth_la_CPPFLAGS = $(plugin_cppflags)
74 libgeneric_oauth_la_LIBADD = $(plugin_libadd)
75 libgeneric_oauth_la_LDFLAGS = $(plugin_ldflags)
76@@ -104,12 +127,9 @@
77 data/webkit-options/api.instagram.com.conf \
78 data/webkit-options/api.weibo.com.conf \
79 data/webkit-options/api.t.sohu.com.conf \
80- data/webkit-options/api.twitter.com.conf \
81 data/webkit-options/foursquare.com.conf \
82 data/webkit-options/identi.ca.conf \
83 data/webkit-options/login.live.com.conf \
84- data/webkit-options/login.yahoo.com.conf \
85- data/webkit-options/www.facebook.com.conf \
86 data/webkit-options/www.linkedin.com.conf
87
88 dist_bin_SCRIPTS = \
89
90=== modified file 'configure.ac'
91--- configure.ac 2014-09-11 10:07:28 +0000
92+++ configure.ac 2016-04-05 11:21:38 +0000
93@@ -41,7 +41,10 @@
94 [have_libaccount_plugin=no])
95
96 AS_IF([test "x$have_libaccount_plugin" = "xyes"],
97- [PKG_CHECK_MODULES([ACCOUNT_PLUGINS], [account-plugin >= 0.1.3])],
98+ [
99+ PKG_CHECK_MODULES([ACCOUNT_PLUGINS], [account-plugin >= 0.1.3])
100+ PKG_CHECK_MODULES([RESTAPIS], [libsoup-2.4 json-glib-1.0])
101+ ],
102 [AS_IF([test "x$enable_libaccount_plugin" = "xyes"],
103 [AC_MSG_ERROR([libaccount-plugin support enabled but required dependencies were not found])])])
104
105
106=== modified file 'data/providers/facebook.provider.in.in'
107--- data/providers/facebook.provider.in.in 2015-09-09 08:48:32 +0000
108+++ data/providers/facebook.provider.in.in 2016-04-05 11:21:38 +0000
109@@ -4,7 +4,7 @@
110 <icon>facebook</icon>
111 <translations>account-plugins</translations>
112 <domains>.*facebook\.com</domains>
113- <plugin>generic-oauth</plugin>
114+ <plugin>facebook</plugin>
115 <single-account>true</single-account>
116
117 <template>
118
119=== modified file 'data/providers/flickr.provider.in.in'
120--- data/providers/flickr.provider.in.in 2013-02-25 06:25:34 +0000
121+++ data/providers/flickr.provider.in.in 2016-04-05 11:21:38 +0000
122@@ -4,7 +4,7 @@
123 <icon>flickr</icon>
124 <translations>account-plugins</translations>
125 <domains>.*flickr\.com</domains>
126- <plugin>generic-oauth</plugin>
127+ <plugin>flickr</plugin>
128
129 <template>
130 <group name="auth">
131
132=== modified file 'data/providers/twitter.provider.in.in'
133--- data/providers/twitter.provider.in.in 2013-02-22 15:17:49 +0000
134+++ data/providers/twitter.provider.in.in 2016-04-05 11:21:38 +0000
135@@ -3,7 +3,7 @@
136 <name>Twitter</name>
137 <icon>twitter</icon>
138 <translations>account-plugins</translations>
139- <plugin>generic-oauth</plugin>
140+ <plugin>twitter</plugin>
141 <domains>.*twitter\.com</domains>
142
143 <template>
144
145=== removed file 'data/webkit-options/api.twitter.com.conf'
146--- data/webkit-options/api.twitter.com.conf 2012-06-19 06:08:30 +0000
147+++ data/webkit-options/api.twitter.com.conf 1970-01-01 00:00:00 +0000
148@@ -1,2 +0,0 @@
149-UsernameField = input[id="username_or_email"]
150-PasswordField = input[id="password"]
151
152=== removed file 'data/webkit-options/login.yahoo.com.conf'
153--- data/webkit-options/login.yahoo.com.conf 2012-06-18 14:24:03 +0000
154+++ data/webkit-options/login.yahoo.com.conf 1970-01-01 00:00:00 +0000
155@@ -1,2 +0,0 @@
156-UsernameField = input[name="login"]
157-PasswordField = input[name="passwd"]
158
159=== removed file 'data/webkit-options/www.facebook.com.conf'
160--- data/webkit-options/www.facebook.com.conf 2012-05-02 22:58:29 +0000
161+++ data/webkit-options/www.facebook.com.conf 1970-01-01 00:00:00 +0000
162@@ -1,7 +0,0 @@
163-ViewportWidth = 420
164-ViewportHeight = 320
165-UsernameField = input[name="email"]
166-PasswordField = input[name="pass"]
167-#ZoomFactor = 2
168-#PreferredWidth = 420
169-
170
171=== modified file 'debian/account-plugin-facebook.install'
172--- debian/account-plugin-facebook.install 2015-04-17 08:53:11 +0000
173+++ debian/account-plugin-facebook.install 2016-04-05 11:21:38 +0000
174@@ -1,4 +1,3 @@
175-etc/signon-ui/webkit-options.d/www.facebook.com.conf
176 usr/share/accounts/services/facebook-sharing.service
177 usr/share/accounts/services/facebook-microblog.service
178 usr/share/accounts/providers/facebook.provider
179
180=== modified file 'debian/account-plugin-flickr.install'
181--- debian/account-plugin-flickr.install 2014-03-31 08:21:46 +0000
182+++ debian/account-plugin-flickr.install 2016-04-05 11:21:38 +0000
183@@ -1,4 +1,3 @@
184-etc/signon-ui/webkit-options.d/login.yahoo.com.conf
185 usr/share/accounts/services/flickr-*.service
186 usr/share/accounts/providers/flickr.provider
187 usr/share/accounts/qml-plugins/flickr/Main.qml
188
189=== modified file 'debian/account-plugin-twitter.install'
190--- debian/account-plugin-twitter.install 2013-06-07 11:56:25 +0000
191+++ debian/account-plugin-twitter.install 2016-04-05 11:21:38 +0000
192@@ -1,4 +1,3 @@
193-etc/signon-ui/webkit-options.d/api.twitter.com.conf
194 usr/share/accounts/services/twitter-microblog.service
195 usr/share/accounts/providers/twitter.provider
196 usr/share/accounts/qml-plugins/twitter/Main.qml
197
198=== modified file 'debian/changelog'
199--- debian/changelog 2016-01-26 10:52:41 +0000
200+++ debian/changelog 2016-04-05 11:21:38 +0000
201@@ -1,3 +1,18 @@
202+account-plugins (0.13-0ubuntu1) UNRELEASED; urgency=medium
203+
204+ * After the authentication, retrieve the username in Google, Facebook,
205+ Flickr and Twitter plugins (LP: #1565772)
206+ * debian/control, debian/libaccount-plugin-facebook.install,
207+ debian/libaccount-plugin-flickr.install,
208+ debian/libaccount-plugin-twitter.install:
209+ add packages containing plugin modules.
210+ * debian/account-plugin-facebook.install,
211+ debian/account-plugin-flickr.install,
212+ debian/account-plugin-twitter.install:
213+ remove unneeded webkit-options files.
214+
215+ -- Alberto Mardegan <alberto.mardegan@canonical.com> Tue, 05 Apr 2016 13:47:48 +0300
216+
217 account-plugins (0.12+16.04.20160126-0ubuntu1) xenial; urgency=medium
218
219 [ Alberto Mardegan ]
220
221=== modified file 'debian/control'
222--- debian/control 2015-07-23 14:10:26 +0000
223+++ debian/control 2016-04-05 11:21:38 +0000
224@@ -7,9 +7,11 @@
225 gobject-introspection,
226 python3,
227 pkg-config,
228+ libaccount-plugin-1.0-dev (>= 0.1.9),
229 libaccounts-glib-dev (>= 1.10),
230+ libjson-glib-dev,
231 libsignon-glib-dev,
232- libaccount-plugin-1.0-dev (>= 0.1.3),
233+ libsoup2.4-dev,
234 valac (>= 0.16),
235 gnome-common,
236 dh-autoreconf,
237@@ -49,26 +51,47 @@
238 Description: GNOME Control Center account plugin for single signon
239 GNOME Control Center account plugins for single signon
240
241+Package: libaccount-plugin-facebook
242+Architecture: any
243+Depends: ${shlibs:Depends}, ${misc:Depends},
244+ signon-plugin-oauth2,
245+Description: GNOME Control Center account plugin for single signon - Facebook Auth
246+ GNOME Control Center account plugins for single signon
247+
248 Package: account-plugin-facebook
249 Architecture: all
250 Depends: ${misc:Depends},
251- libaccount-plugin-generic-oauth | ubuntu-system-settings-online-accounts,
252+ libaccount-plugin-facebook | ubuntu-system-settings-online-accounts,
253 unity-asset-pool (>> 0.8.24daily12.12.05-0ubuntu1),
254 Description: GNOME Control Center account plugin for single signon - facebook
255 GNOME Control Center account plugins for single signon
256
257+Package: libaccount-plugin-twitter
258+Architecture: any
259+Depends: ${shlibs:Depends}, ${misc:Depends},
260+ signon-plugin-oauth2,
261+Description: GNOME Control Center account plugin for single signon - Twitter Auth
262+ GNOME Control Center account plugins for single signon
263+
264 Package: account-plugin-twitter
265 Architecture: all
266 Depends: ${misc:Depends},
267- libaccount-plugin-generic-oauth | ubuntu-system-settings-online-accounts,
268+ libaccount-plugin-twitter | ubuntu-system-settings-online-accounts,
269 unity-asset-pool (>> 0.8.24daily12.12.05-0ubuntu1),
270 Description: GNOME Control Center account plugin for single signon - twitter
271 GNOME Control Center account plugins for single signon
272
273+Package: libaccount-plugin-flickr
274+Architecture: any
275+Depends: ${shlibs:Depends}, ${misc:Depends},
276+ signon-plugin-oauth2,
277+Description: GNOME Control Center account plugin for single signon - Flickr Auth
278+ GNOME Control Center account plugins for single signon
279+
280 Package: account-plugin-flickr
281 Architecture: all
282 Depends: ${misc:Depends},
283- libaccount-plugin-generic-oauth | ubuntu-system-settings-online-accounts,
284+ libaccount-plugin-flickr | ubuntu-system-settings-online-accounts,
285 unity-asset-pool (>> 0.8.24daily12.12.05-0ubuntu1),
286 Description: GNOME Control Center account plugin for single signon - flickr
287 GNOME Control Center account plugins for single signon
288
289=== added file 'debian/libaccount-plugin-facebook.install'
290--- debian/libaccount-plugin-facebook.install 1970-01-01 00:00:00 +0000
291+++ debian/libaccount-plugin-facebook.install 2016-04-05 11:21:38 +0000
292@@ -0,0 +1,1 @@
293+usr/lib/libaccount-plugin-1.0/providers/libfacebook.so
294
295=== added file 'debian/libaccount-plugin-flickr.install'
296--- debian/libaccount-plugin-flickr.install 1970-01-01 00:00:00 +0000
297+++ debian/libaccount-plugin-flickr.install 2016-04-05 11:21:38 +0000
298@@ -0,0 +1,1 @@
299+usr/lib/libaccount-plugin-1.0/providers/libflickr.so
300
301=== added file 'debian/libaccount-plugin-twitter.install'
302--- debian/libaccount-plugin-twitter.install 1970-01-01 00:00:00 +0000
303+++ debian/libaccount-plugin-twitter.install 2016-04-05 11:21:38 +0000
304@@ -0,0 +1,1 @@
305+usr/lib/libaccount-plugin-1.0/providers/libtwitter.so
306
307=== added file 'src/facebook.vala'
308--- src/facebook.vala 1970-01-01 00:00:00 +0000
309+++ src/facebook.vala 2016-04-05 11:21:38 +0000
310@@ -0,0 +1,69 @@
311+/*
312+ * Copyright (C) 2016 Canonical, Inc
313+ *
314+ * This program is free software; you can redistribute it and/or modify
315+ * it under the terms of the GNU General Public License version 2 as
316+ * published by the Free Software Foundation.
317+ *
318+ * This program is distributed in the hope that it will be useful,
319+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
320+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
321+ * GNU General Public License for more details.
322+ *
323+ * You should have received a copy of the GNU General Public License
324+ * along with this program; if not, write to the Free Software
325+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
326+ * USA.
327+ *
328+ * Authors:
329+ * Alberto Mardegan <alberto.mardegan@canonical.com>
330+ */
331+
332+public class FacebookPlugin : Ap.OAuthPlugin {
333+ private Soup.Session session;
334+
335+ public FacebookPlugin (Ag.Account account) {
336+ Object (account: account);
337+ }
338+
339+ private void fetch_username (string access_token) {
340+ debug ("fetching username, AT = " + access_token);
341+ Soup.URI destination_uri =
342+ new Soup.URI ("https://graph.facebook.com/me?access_token=" +
343+ access_token);
344+ var message = new Soup.Message.from_uri ("GET", destination_uri);
345+ session = new Soup.Session ();
346+ session.queue_message (message, (sess, msg) => {
347+ debug ("Got message reply");
348+ string body = (string) msg.response_body.data;
349+ Json.Parser parser = new Json.Parser ();
350+ try {
351+ parser.load_from_data (body);
352+
353+ Json.Node root = parser.get_root ();
354+ Json.Object response_object = root.get_object ();
355+ var username = response_object.get_string_member ("name");
356+ account.set_display_name (username);
357+ } catch (Error error) {
358+ warning ("Could not parse reply: " + body);
359+ }
360+
361+ store_account ();
362+ });
363+ }
364+
365+ protected override void query_username () {
366+ var reply = get_oauth_reply ();
367+ Variant? v_token = reply.lookup_value ("AccessToken", null);
368+ if (v_token != null) {
369+ fetch_username (v_token.get_string ());
370+ } else {
371+ store_account ();
372+ }
373+ }
374+}
375+
376+public GLib.Type ap_module_get_object_type ()
377+{
378+ return typeof (FacebookPlugin);
379+}
380
381=== added file 'src/flickr.vala'
382--- src/flickr.vala 1970-01-01 00:00:00 +0000
383+++ src/flickr.vala 2016-04-05 11:21:38 +0000
384@@ -0,0 +1,41 @@
385+/*
386+ * Copyright (C) 2016 Canonical, Inc
387+ *
388+ * This program is free software; you can redistribute it and/or modify
389+ * it under the terms of the GNU General Public License version 2 as
390+ * published by the Free Software Foundation.
391+ *
392+ * This program is distributed in the hope that it will be useful,
393+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
394+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
395+ * GNU General Public License for more details.
396+ *
397+ * You should have received a copy of the GNU General Public License
398+ * along with this program; if not, write to the Free Software
399+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
400+ * USA.
401+ *
402+ * Authors:
403+ * Alberto Mardegan <alberto.mardegan@canonical.com>
404+ */
405+
406+public class FlickrPlugin : Ap.OAuthPlugin {
407+ public FlickrPlugin (Ag.Account account) {
408+ Object (account: account);
409+ }
410+
411+ protected override void query_username () {
412+ var reply = get_oauth_reply ();
413+ Variant? v_name = reply.lookup_value ("username", null);
414+ if (v_name != null) {
415+ account.set_display_name (v_name.get_string ());
416+ }
417+
418+ store_account ();
419+ }
420+}
421+
422+public GLib.Type ap_module_get_object_type ()
423+{
424+ return typeof (FlickrPlugin);
425+}
426
427=== modified file 'src/google.vala'
428--- src/google.vala 2013-06-06 13:16:51 +0000
429+++ src/google.vala 2016-04-05 11:21:38 +0000
430@@ -1,5 +1,5 @@
431 /*
432- * Copyright (C) 2012 Canonical, Inc
433+ * Copyright (C) 2012-2016 Canonical, Inc
434 *
435 * This program is free software; you can redistribute it and/or modify
436 * it under the terms of the GNU General Public License version 2 as
437@@ -20,6 +20,8 @@
438 */
439
440 public class GooglePlugin : Ap.OAuthPlugin {
441+ private Soup.Session session;
442+
443 public GooglePlugin (Ag.Account account) {
444 Object (account: account);
445 }
446@@ -44,6 +46,43 @@
447
448 set_ignore_cookies (true);
449 }
450+
451+ private void fetch_username (string access_token) {
452+ debug ("fetching username, AT = " + access_token);
453+ Soup.URI destination_uri =
454+ new Soup.URI ("https://www.googleapis.com/oauth2/v3/userinfo");
455+ var message = new Soup.Message.from_uri ("POST", destination_uri);
456+ message.request_headers.append ("Authorization", "Bearer " + access_token);
457+ message.request_headers.set_content_length (0);
458+ session = new Soup.Session ();
459+ session.queue_message (message, (sess, msg) => {
460+ debug ("Got message reply");
461+ string body = (string) msg.response_body.data;
462+ Json.Parser parser = new Json.Parser ();
463+ try {
464+ parser.load_from_data (body);
465+
466+ Json.Node root = parser.get_root ();
467+ Json.Object response_object = root.get_object ();
468+ var username = response_object.get_string_member ("email");
469+ account.set_display_name (username);
470+ } catch (Error error) {
471+ warning ("Could not parse reply: " + body);
472+ }
473+
474+ store_account ();
475+ });
476+ }
477+
478+ protected override void query_username () {
479+ var reply = get_oauth_reply ();
480+ Variant? v_token = reply.lookup_value ("AccessToken", null);
481+ if (v_token != null) {
482+ fetch_username (v_token.get_string ());
483+ } else {
484+ store_account ();
485+ }
486+ }
487 }
488
489 public GLib.Type ap_module_get_object_type ()
490
491=== added file 'src/twitter.vala'
492--- src/twitter.vala 1970-01-01 00:00:00 +0000
493+++ src/twitter.vala 2016-04-05 11:21:38 +0000
494@@ -0,0 +1,46 @@
495+/*
496+ * Copyright (C) 2016 Canonical, Inc
497+ *
498+ * This program is free software; you can redistribute it and/or modify
499+ * it under the terms of the GNU General Public License version 2 as
500+ * published by the Free Software Foundation.
501+ *
502+ * This program is distributed in the hope that it will be useful,
503+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
504+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
505+ * GNU General Public License for more details.
506+ *
507+ * You should have received a copy of the GNU General Public License
508+ * along with this program; if not, write to the Free Software
509+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
510+ * USA.
511+ *
512+ * Authors:
513+ * Alberto Mardegan <alberto.mardegan@canonical.com>
514+ */
515+
516+public class TwitterPlugin : Ap.OAuthPlugin {
517+ public TwitterPlugin (Ag.Account account) {
518+ Object (account: account);
519+ }
520+
521+ protected override void query_username () {
522+ var reply = get_oauth_reply ();
523+ Variant? v_name = reply.lookup_value ("ScreenName", null);
524+ if (v_name != null) {
525+ account.set_display_name (v_name.get_string ());
526+ } else {
527+ v_name = reply.lookup_value ("UserId", null);
528+ if (v_name != null) {
529+ account.set_display_name (v_name.get_string ());
530+ }
531+ }
532+
533+ store_account ();
534+ }
535+}
536+
537+public GLib.Type ap_module_get_object_type ()
538+{
539+ return typeof (TwitterPlugin);
540+}

Subscribers

People subscribed via source and target branches

to all changes: