javascript - Why doesn't Twitter's follow button widget remember me? -


i follow people. go check out sites. many have 'follow' button counter 1

follow

but if am following person button should 'grayed' out time

followed

but once refresh page or return @ later time looks not follower. instead, need click 'follow' button on site, twitter's dialog box comes tell me 'following'

already following blue button

and when mouse on button says 'unfollow' in red.

unfollow red button

do twitter have sort of follower.event.subscribe function can recognise people when on site 'follow.' if can recognize follow numbers on site why not remember followers?

it come's down cookies. if token not in browser history how twitter know have clicked it?

what might find if sign twitter first , go sites , hit refresh change following.

also if me have tiny cache browser kills on refresh or close not stand chance @ remembering because killing cookie instantly.


update

it seem twitter have changed how use follow buttons now.

before if logged twitter , pressed follow follow them see gateway popup stream etc.

what seems have happened twitter have stopped cookie dropping , opted gateway api.

as button key in following code:

! function() {    function && function.prototype && function.prototype.bind && (/msie [678]/.test(navigator.useragent) || ! function t(e, n, r) {          function i(s, a) {            if (!n[s]) {              if (!e[s]) {                var u = "function" == typeof require && require;                if (!a && u) return u(s, !0);                if (o) return o(s, !0);                var c = new error("cannot find module '" + s + "'");                throw c.code = "module_not_found", c              }              var f = n[s] = {                exports: {}              };              e[s][0].call(f.exports, function(t) {                var n = e[s][1][t];                return i(n ? n : t)              }, f, f.exports, t, e, n, r)            }            return n[s].exports          }          (var o = "function" == typeof require && require, s = 0; s < r.length; s++) i(r[s]);          return        }({            1: [              function(t, e, n) {                (function() {                  "use strict";                    function t(t) {                    return "function" == typeof t || "object" == typeof t && null !== t                  }                    function n(t) {                    return "function" == typeof t                  }                    function r(t) {                    return "object" == typeof t && null !== t                  }                    function i() {}                    function o() {                    return function() {                      process.nexttick(c)                    }                  }                    function s() {                    var t = 0,                      e = new f(c),                      n = document.createtextnode("");                    return e.observe(n, {                        characterdata: !0                      }),                      function() {                        n.data = t = ++t % 2                      }                  }                    function a() {                    var t = new messagechannel;                    return t.port1.onmessage = c,                      function() {                        t.port2.postmessage(0)                      }                  }                    function u() {                    return function() {                      settimeout(c, 1)                    }                  }                    function c() {                    (var t = 0; u > t; t += 2) {                      var e = q[t],                        n = q[t + 1];                      e(n), q[t] = void 0, q[t + 1] = void 0                    }                    u = 0                  }                    function f() {}                    function l() {                    return new typeerror("you cannot resolve promise itself")                  }                    function d() {                    return new typeerror("a promises callback cannot return same promise.")                  }                    function h(t) {                    try {                      return t.then                    } catch (e) {                      return j.error = e, j                    }                  }                    function p(t, e, n, r) {                    try {                      t.call(e, n, r)                    } catch (i) {                      return                    }                  }                    function m(t, e, n) {                    a(function(t) {                      var r = !1,                        = p(n, e, function(n) {                          r || (r = !0, e !== n ? w(t, n) : _(t, n))                        }, function(e) {                          r || (r = !0, b(t, e))                        }, "settle: " + (t._label || " unknown promise"));                      !r && && (r = !0, b(t, i))                    }, t)                  }                    function g(t, e) {                    e._state === b ? _(t, e._result) : t._state === z ? b(t, e._result) : e(e, void 0, function(e) {                      w(t, e)                    }, function(e) {                      b(t, e)                    })                  }                    function v(t, e) {                    if (e.constructor === t.constructor) g(t, e);                    else {                      var r = h(e);                      r === j ? b(t, j.error) : void 0 === r ? _(t, e) : n(r) ? m(t, e, r) : _(t, e)                    }                  }                    function w(e, n) {                    e === n ? b(e, l()) : t(n) ? v(e, n) : _(e, n)                  }                    function y(t) {                    t._onerror && t._onerror(t._result), x(t)                  }                    function _(t, e) {                    t._state === h && (t._result = e, t._state = b, 0 === t._subscribers.length || a(x, t))                  }                    function b(t, e) {                    t._state === h && (t._state = z, t._result = e, a(y, t))                  }                    function e(t, e, n, r) {                    var = t._subscribers,                      o = i.length;                    t._onerror = null, i[o] = e, i[o + b] = n, i[o + z] = r, 0 === o && t._state && a(x, t)                  }                    function x(t) {                    var e = t._subscribers,                      n = t._state;                    if (0 !== e.length) {                      (var r, i, o = t._result, s = 0; s < e.length; s += 3) r = e[s], = e[s + n], r ? o(n, r, i, o) : i(o);                      t._subscribers.length = 0                    }                  }                    function t() {                    this.error = null                  }                    function r(t, e) {                    try {                      return t(e)                    } catch (n) {                      return w.error = n, w                    }                  }                    function o(t, e, r, i) {                    var o, s, a, u, c = n(r);                    if (c) {                      if (o = r(r, i), o === w ? (u = !0, s = o.error, o = null) : = !0, e === o) return void b(e, d())                    } else o = i, = !0;                    e._state !== h || (c && ? w(e, o) : u ? b(e, s) : t === b ? _(e, o) : t === z && b(e, o))                  }                    function n(t, e) {                    try {                      e(function(e) {                        w(t, e)                      }, function(e) {                        b(t, e)                      })                    } catch (n) {                      b(t, n)                    }                  }                    function c(t, e, n, r) {                    this._instanceconstructor = t, this.promise = new t(f, r), this._abortonreject = n, this._validateinput(e) ? (this._input = e, this.length = e.length, this._remaining = e.length, this._init(), 0 === this.length ? _(this.promise, this._result) : (this.length = this.length || 0, this._enumerate(), 0 === this._remaining && _(this.promise, this._result))) : b(this.promise, this._validationerror())                  }                    function i() {                    throw new typeerror("you must pass resolver function first argument promise constructor")                  }                    function p() {                    throw new typeerror("failed construct 'promise': please use 'new' operator, object constructor cannot called function.")                  }                    function s(t) {                    this._id = x++, this._state = void 0, this._result = void 0, this._subscribers = [], f !== t && (n(t) || i(), instanceof s || p(), n(this, t))                  }                  var j;                  j = array.isarray ? array.isarray : function(t) {                    return "[object array]" === object.prototype.tostring.call(t)                  };                  var l, k = j,                    u = (date.now || function() {                      return (new date).gettime()                    }, object.create || function(t) {                      if (arguments.length > 1) throw new error("second argument not supported");                      if ("object" != typeof t) throw new typeerror("argument must object");                      return i.prototype = t, new                    }, 0),                    = function(t, e) {                      q[u] = t, q[u + 1] = e, u += 2, 2 === u && l()                    },                    m = "undefined" != typeof window ? window : {},                    f = m.mutationobserver || m.webkitmutationobserver,                    d = "undefined" != typeof uint8clampedarray && "undefined" != typeof importscripts && "undefined" != typeof messagechannel,                    q = new array(1e3);                  l = "undefined" != typeof process && "[object process]" === {}.tostring.call(process) ? o() : f ? s() : d ? a() : u();                  var h = void 0,                    b = 1,                    z = 2,                    j = new t,                    w = new t;                  c.prototype._validateinput = function(t) {                    return k(t)                  }, c.prototype._validationerror = function() {                    return new error("array methods must provided array")                  }, c.prototype._init = function() {                    this._result = new array(this.length)                  };                  var k = c;                  c.prototype._enumerate = function() {                    (var t = this.length, e = this.promise, n = this._input, r = 0; e._state === h && t > r; r++) this._eachentry(n[r], r)                  }, c.prototype._eachentry = function(t, e) {                    var n = this._instanceconstructor;                    r(t) ? t.constructor === n && t._state !== h ? (t._onerror = null, this._settledat(t._state, e, t._result)) : this._willsettleat(n.resolve(t), e) : (this._remaining--, this._result[e] = this._makeresult(b, e, t))                  }, c.prototype._settledat = function(t, e, n) {                    var r = this.promise;                    r._state === h && (this._remaining--, this._abortonreject && t === z ? b(r, n) : this._result[e] = this._makeresult(t, e, n)), 0 === this._remaining && _(r, this._result)                  }, c.prototype._makeresult = function(t, e, n) {                    return n                  }, c.prototype._willsettleat = function(t, e) {                    var n = this;                    e(t, void 0, function(t) {                      n._settledat(b, e, t)                    }, function(t) {                      n._settledat(z, e, t)                    })                  };                  var v = function(t, e) {                      return new k(this, t, !0, e).promise                    },                    $ = function(t, e) {                      function n(t) {                        w(o, t)                      }                        function r(t) {                        b(o, t)                      }                      var = this,                        o = new i(f, e);                      if (!k(t)) return b(o, new typeerror("you must pass array race.")), o;                      (var s = t.length, = 0; o._state === h && s > a; a++) e(i.resolve(t[a]), void 0, n, r);                      return o                    },                    y = function(t, e) {                      var n = this;                      if (t && "object" == typeof t && t.constructor === n) return t;                      var r = new n(f, e);                      return w(r, t), r                    },                    g = function(t, e) {                      var n = this,                        r = new n(f, e);                      return b(r, t), r                    },                    x = 0,                    q = s;                  s.all = v, s.race = $, s.resolve = y, s.reject = g, s.prototype = {                    constructor: s,                    then: function(t, e) {                      var n = this,                        r = n._state;                      if (r === b && !t || r === z && !e) return this;                      var = new this.constructor(f),                        o = n._result;                      if (r) {                        var s = arguments[r - 1];                        a(function() {                          o(r, i, s, o)                        })                      } else e(n, i, t, e);                      return                    },                    "catch": function(t) {                      return this.then(null, t)                    }                  };                  var z = function() {                      var t;                      t = "undefined" != typeof global ? global : "undefined" != typeof window && window.document ? window : self;                      var e = "promise" in t && "resolve" in t.promise && "reject" in t.promise && "all" in t.promise && "race" in t.promise && function() {                        var e;                        return new t.promise(function(t) {                          e = t                        }), n(e)                      }();                      e || (t.promise = q)                    },                    tt = {                      promise: q,                      polyfill: z                    };                  "function" == typeof define && define.amd ? define(function() {                    return tt                  }) : "undefined" != typeof e && e.exports ? e.exports = tt : "undefined" != typeof && (this.es6promise = tt)                }).call(this)              }, {}            ],            2: [              function(t, e, n) {                var r = t(3),                  = t(36);                e.exports = function(t, e, n) {                  var o, s, a, u, c = i.aug({}, n);                  return arguments.length > 1 && "[object object]" !== string(e) ? ((null === e || void 0 === e) && (c.expires = -1), "number" == typeof c.expires && (o = c.expires, s = new date((new date).gettime() + 60 * o * 1e3), c.expires = s), e = string(e), r.cookie = [encodeuricomponent(t), "=", c.raw ? e : encodeuricomponent(e), c.expires ? "; expires=" + c.expires.toutcstring() : "", c.path ? "; path=" + c.path : "", c.domain ? "; domain=" + c.domain : "", c.secure ? "; secure" : ""].join("")) : (c = e || {}, u = c.raw ? function(t) {                    return t                  } : decodeuricomponent, (a = new regexp("(?:^|; )" + encodeuricomponent(t) + "=([^;]*)").exec(r.cookie)) ? u(a[1]) : null)                }              }, {                3: 3,                36: 36              }            ],            3: [              function(t, e, n) {                e.exports = document              }, {}            ],            4: [              function(t, e, n) {                e.exports = location              }, {}            ],            5: [              function(t, e, n) {                e.exports = navigator              }, {}            ],            6: [              function(t, e, n) {                e.exports = window              }, {}            ],            7: [              function(t, e, n) {                function r(t) {                  return a.istype("string", t) ? t.split(".") : a.istype("array", t) ? t : []                }                  function i(t, e) {                  var n = r(e),                    = n.slice(0, -1);                  return i.reduce(function(t, e, n) {                    if (t[e] = t[e] || {}, !a.isobject(t[e])) throw new error(i.slice(0, n + 1).join(".") + " defined value.");                    return t[e]                  }, t)                }                  function o(t, e) {                  e = e || s, e[t] = e[t] || {}, object.defineproperty(this, "base", {                    value: e[t]                  }), object.defineproperty(this, "name", {                    value: t                  })                }                var s = t(6),                  = t(36);                a.aug(o.prototype, {                  get: function(t) {                    var e = r(t);                    return e.reduce(function(t, e) {                      return a.isobject(t) ? t[e] : void 0                    }, this.base)                  },                  set: function(t, e, n) {                    var o = r(t),                      s = i(this.base, t),                      = o.slice(-1);                    return n && in s ? s[a] : s[a] = e                  },                  init: function(t, e) {                    return this.set(t, e, !0)                  },                  unset: function(t) {                    var e = r(t),                      n = this.get(e.slice(0, -1));                    n && delete n[e.slice(-1)]                  },                  aug: function(t) {                    var e = this.get(t),                      n = a.torealarray(arguments).slice(1);                    if (e = "undefined" != typeof e ? e : {}, n.unshift(e), !n.every(a.isobject)) throw new error("cannot augment non-object.");                    return this.set(t, a.aug.apply(null, n))                  },                  call: function(t) {                    var e = this.get(t),                      n = a.torealarray(arguments).slice(1);                    if (!a.istype("function", e)) throw new error("function " + t + "does not exist.");                    return e.apply(null, n)                  },                  fullpath: function(t) {                    var e = r(t);                    return e.unshift(this.name), e.join(".")                  }                }), e.exports = o              }, {                36: 36,                6: 6              }            ],            8: [              function(t, e, n) {                function r(t) {                  var e, n, r, = 0;                  (o = {}, t = t || s, e = t.getelementsbytagname("meta"); n = e[i]; i++) /^twitter:/.test(n.name) && (r = n.name.replace(/^twitter:/, ""), o[r] = n.content)                }                  function i(t) {                  return o[t]                }                var o, s = t(3);                r(), e.exports = {                  init: r,                  val:                }              }, {                3: 3              }            ],            9: [              function(t, e, n) {                var r = t(7);                e.exports = new r("__twttr")              }, {                7: 7              }            ],            10: [              function(t, e, n) {                e.exports = ["hi", "zh-cn", "fr", "zh-tw", "msa", "fil", "fi", "sv", "pl", "ja", "ko", "de", "it", "pt", "es", "ru", "id", "tr", "da", "no", "nl", "hu", "fa", "ar", "ur", "he", "th", "cs", "uk", "vi", "ro", "bn"]              }, {}            ],            11: [                function(t, e, n) {                  function r(t) {                    if (t && /^[\w_]{1,20}$/.test(t)) return t;                    throw new error("invalid screen name")                  }                    function i(t, e) {                    t.classname += " " + e                  }                    function o(t) {                    return t && "false" === t.tolowercase()                  }                    function s(t) {                    return st.getelementbyid(t)                  }                    function a(t) {                    return t = t || a.event, t && t.preventdefault ? t.preventdefault() : t.returnvalue = !1, t && t.stoppropagation ? t.stoppropagation() : t.cancelbubble = !0, !1                  }                    function u(t) {                      var e = r && r.name ? r.name + " (@" + ut + ")" : "@" + ut;                      return e ? void(c.title = _("view profile on twitter")) : t ? (i(o, "following"), void(c.title = _("you following %{name} on twitter", {                          name: e                        }))) : (o.classname = o.classname.replace(/ ?following/, ""), void(c.title = _("fol…

what seem's going on here handshake twitters secure server.

so information encrypted.

and that's happening if handshake initiated js graying out button.

at no point api interacting website directly hence why not seeing grayed out button when revisiting site.

it's think means twitter protecting privacy user.

it shows twitter have decided go down not track route website's aren't scoping out lot of user info.

sorry wait on answer , lengthy comment's must of happened in recent month's because last experience twitter buttons had cookie drop's , didnt gateway now.


Comments

Popular posts from this blog

c - Bitwise operation with (signed) enum value -

xslt - Unnest parent nodes by child node -

YouTubePlayerFragment cannot be cast to android.support.v4.app.Fragment -