Facebook Inc.’s chances of getting back into China appeared to take a rare turn for the better when an employee noticed an official posting online: Beijing authorities had granted it a license to open a representative office in two office-tower suites in the capital.

Such permits typically give Western firms an initial China beachhead. This one, which Facebook won in late 2015, could have been a sign Beijing was ready to give the company another chance to connect with China’s roughly 700 million internet users, reopening...