Starbucks shares declined in aftermarket trading Thursday after the company posted weaker-than-expected third-quarter revenue and lowered its full-year 2017 forecast.

The company posted earnings of 55 cents per share on $5.66 billion in revenue. The coffee giant is expected to report earnings of 55 cents per share on $5.75 billion in revenue, according to Thomson Reuters estimates.

Shares of the coffee giant fell more than 6 percent following the report.

Despite posting its highest U.S. same-store sales in five quarters, Starbucks CFO Scott Maw said the company is "a bit more cautious" about the current quarter amid broader pressure on the slumping retail sector.

Starbucks said that it now expects to see earnings per share for full-year 2017 to be between $2.05 and $2.06. Previously, the company forecast EPS in the range of $2.08 to $2.12.

In addition, the company said it expects revenue growth will be on the lower end of its previous range of 8 percent to 10 percent.

Starbucks said same-store sales rose 4 percent during the quarter. Analysts had anticipated global same-store sales growth of 4.9 percent for the quarter, according to StreetAccount.

This is the third quarter in a row that Starbucks has posted weaker-than-expected same-store sales.