in reply to Re^3: Completely puzzled in creating content for post method of mechanize module
in thread Completely puzzled in creating content for post method of mechanize module

This node falls below the community's threshold of quality. You may see it by logging in.
  • Comment on Re^4: Completely puzzled in creating content for post method of mechanize module

Replies are listed 'Best First'.
Re^5: Completely puzzled in creating content for post method of mechanize module
by marto (Cardinal) on Apr 04, 2012 at 13:06 UTC

    What with it being lunchtime I did some searching on this. Apparently phstamp was recently introduced by FaceBook (note, I'm not a FaceBook user) to verify each request. I suspect they don't want you automating FaceBook via such methods, I'm pretty sure they'd have something in their conditions of use against such behaviour.

Re^5: Completely puzzled in creating content for post method of mechanize module
by tobyink (Canon) on Apr 04, 2012 at 13:07 UTC

    Googling for "Facebook phstamp" seems to suggest that it should be reasonably easy to generate that phstamp value:

    CRACKED Facebook's phstamp

    perl -E'sub Monkey::do{say$_,for@_,do{($monkey=[caller(0)]->[3])=~s{::}{ }and$monkey}}"Monkey say"->Monkey::do'
      Guys my problem is resolved and we don't need to find exact phstamp to update those attributes since phstamp is something which gets generated with response, so a normal random number can be used as phstamp, since i guess it's something which is generated at client end and server doesn't have its record. Server only seeks for this attribute at the time of update.